diff --git a/docs/src/content/docs/changelog.mdx b/docs/src/content/docs/changelog.mdx index e76ab60dc..3603ea4a2 100644 --- a/docs/src/content/docs/changelog.mdx +++ b/docs/src/content/docs/changelog.mdx @@ -115,6 +115,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed initially-hidden menu items by [@IanVS](https://github.com/IanVS) in [#4116](https://github.com/wailsapp/wails/pull/4116) - Fixed assetFileServer not serving `.html` files when non-extension request when `[request]` doesn't exist but `[request].html` does - Fixed icon generation paths by [@robin-samuel](https://github.com/robin-samuel) in [#4125](https://github.com/wailsapp/wails/pull/4125) +- Fixed `fullscreen`, `unfullscreen`, `unminimise` and `unmaximise` events not being emitted by [@oSethoum](https://github.com/osethoum) in [#4130](https://github.com/wailsapp/wails/pull/4130) - Fixed NSIS Error because of incorrect prefix on default version in config by [@robin-samuel](https://github.com/robin-samuel) in [#4126](https://github.com/wailsapp/wails/pull/4126) - Fixed Dialogs runtime function returning escaped paths on Windows by [TheGB0077](https://github.com/TheGB0077) in [#4188](https://github.com/wailsapp/wails/pull/4188) - Fixed Webview2 detection path in HKCU by [@leaanthony](https://github.com/leaanthony). diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index 05647b09b..587154a11 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -686,6 +686,7 @@ func (w *windowsWebviewWindow) maximise() { func (w *windowsWebviewWindow) unmaximise() { w.restore() + w.parent.emit(events.Windows.WindowUnMaximise) } func (w *windowsWebviewWindow) restore() { @@ -726,6 +727,7 @@ func (w *windowsWebviewWindow) fullscreen() { int(monitorInfo.RcMonitor.Bottom-monitorInfo.RcMonitor.Top), w32.SWP_NOOWNERZORDER|w32.SWP_FRAMECHANGED) w.chromium.Focus() + w.parent.emit(events.Windows.WindowFullscreen) } func (w *windowsWebviewWindow) unfullscreen() { @@ -745,6 +747,7 @@ func (w *windowsWebviewWindow) unfullscreen() { w32.SetWindowPos(w.hwnd, 0, 0, 0, 0, 0, w32.SWP_NOMOVE|w32.SWP_NOSIZE|w32.SWP_NOZORDER|w32.SWP_NOOWNERZORDER|w32.SWP_FRAMECHANGED) w.enableSizeConstraints() + w.parent.emit(events.Windows.WindowUnFullscreen) } func (w *windowsWebviewWindow) isMinimised() bool { @@ -1209,6 +1212,9 @@ func (w *windowsWebviewWindow) WndProc(msg uint32, wparam, lparam uintptr) uintp case w32.SIZE_MAXIMIZED: w.parent.emit(events.Windows.WindowMaximise) case w32.SIZE_RESTORED: + if w.isMinimizing { + w.parent.emit(events.Windows.WindowUnMinimise) + } w.isMinimizing = false w.parent.emit(events.Windows.WindowRestore) case w32.SIZE_MINIMIZED: