diff --git a/v3/STATUS.md b/v3/STATUS.md index 23497b32..b42785ea 100644 --- a/v3/STATUS.md +++ b/v3/STATUS.md @@ -187,7 +187,6 @@ An 'X' indicates that the option is not supported by the platform. | CSS | Y | | | | | X | Y | | | | | Y | Y | | | | -| HideOnClose | Y | | | | | FullscreenButtonEnabled | Y | | | | | Hidden | Y | | | | | EnableFraudulentWebsiteWarnings | | | | | diff --git a/v3/V3 Changes.md b/v3/V3 Changes.md index 9701d375..57bd28fa 100644 --- a/v3/V3 Changes.md +++ b/v3/V3 Changes.md @@ -233,4 +233,23 @@ func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (returnValue uintptr, sho The `shouldReturn` value should be set to `true` if the returnValue should be returned by the main wndProc method. If it is set to `false`, the return value will be ignored and the message will continue to be processed by the main -wndProc method. \ No newline at end of file +wndProc method. + +## Hide Window on Close + OnBeforeClose + +In v2, there was the `HideWindowOnClose` flag to hide the window when it closed. There was a logical overlap between +this flag and the `OnBeforeClose` callback. In v3, the `HideWindowOnClose` flag has been removed and the `OnBeforeClose` +callback has been renamed to `ShouldClose`. The `ShouldClose` callback is called when the user attempts to close a +window. If the callback returns `true`, the window will close. If it returns `false`, the window will not close. +This can be used to hide the window instead of closing it. + +## Window Drag + +In v2, the `--wails-drag` attribute was used to indicate that an element could be used to drag the window. +In v3, this has been replaced with `--webkit-app-region` to be more in line with the way other frameworks +handle this. The `--webkit-app-region` attribute can be set to any of the following values: +- `drag` - The element can be used to drag the window +- `no-drag` - The element cannot be used to drag the window + +We would have ideally liked to use `app-region`, however this is not supported by the `getComputedStyle` call on +webkit on macOS. \ No newline at end of file diff --git a/v3/examples/frameless/assets/index.html b/v3/examples/frameless/assets/index.html index 8b58af63..3889e74e 100644 --- a/v3/examples/frameless/assets/index.html +++ b/v3/examples/frameless/assets/index.html @@ -23,10 +23,10 @@