From 635ddf5c363e01fc6863aa4fd6222d14fa30b9f1 Mon Sep 17 00:00:00 2001 From: Oussama Sethoum <88779394+oSethoum@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:00:22 +0100 Subject: [PATCH 1/2] fix: fullscreen, unfullscreen, unminise and unmaximise window events weren't being emitted. --- v3/pkg/application/webview_window_windows.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index 89bea1cbd..92684ae73 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -679,6 +679,7 @@ func (w *windowsWebviewWindow) maximise() { func (w *windowsWebviewWindow) unmaximise() { w.restore() + w.parent.emit(events.Windows.WindowUnMaximise) } func (w *windowsWebviewWindow) restore() { @@ -719,6 +720,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() { @@ -738,6 +740,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 { @@ -1202,6 +1205,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: From 302c74e90d96bf3c795e0e64a83744511d865d20 Mon Sep 17 00:00:00 2001 From: Oussama Sethoum <88779394+oSethoum@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:34:50 +0100 Subject: [PATCH 2/2] add: entry in the changelog.mdx for reference. --- docs/src/content/docs/changelog.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/content/docs/changelog.mdx b/docs/src/content/docs/changelog.mdx index a64d2e718..326c9c864 100644 --- a/docs/src/content/docs/changelog.mdx +++ b/docs/src/content/docs/changelog.mdx @@ -109,6 +109,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed [#4097](https://github.com/wailsapp/wails/issues/4097) Webpack/angular discards runtime init code by [@fbbdev](https://github.com/fbbdev) in [#4100](https://github.com/wailsapp/wails/pull/4100) - 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) ### Changed