From 0c3025d695c3f19b39bbb0e42d0f6c72c9eaee59 Mon Sep 17 00:00:00 2001 From: Fabio Massaioli Date: Sat, 2 Mar 2024 06:04:02 +0100 Subject: [PATCH] [v3] Fix ordering of if branches in WebviewWindow.Restore method (#3279) * Add JS Window API example * Fix ordering of if branches in Window.Restore method * Add changelog entry --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/webview_window.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 5cc3cb389..b77a6bdc7 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix MacOS systray click handling when no attached window by [thomas-senechal](https://github.com/thomas-senechal) in PR [#3207](https://github.com/wailsapp/wails/pull/3207) - Fix failing Windows build due to unknown option by [thomas-senechal](https://github.com/thomas-senechal) in PR [#3208](https://github.com/wailsapp/wails/pull/3208) - Fix wrong baseURL when open window twice by @5aaee9 in PR [#3273](https://github.com/wailsapp/wails/pull/3273) +- Fix ordering of if branches in `WebviewWindow.Restore` method by [@fbbdev](https://github.com/fbbdev) in [#3279](https://github.com/wailsapp/wails/pull/3279) ### Changed diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index 84b57d165..833ba7a91 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -962,10 +962,10 @@ func (w *WebviewWindow) Restore() { InvokeSync(func() { if w.IsMinimised() { w.UnMinimise() - } else if w.IsMaximised() { - w.UnMaximise() } else if w.IsFullscreen() { w.UnFullscreen() + } else if w.IsMaximised() { + w.UnMaximise() } w.emit(events.Common.WindowRestore) })