From 114c15197b20c7da038fee0d001911ae6a9c9857 Mon Sep 17 00:00:00 2001 From: "dingda.li" Date: Tue, 4 Mar 2025 14:39:06 +0800 Subject: [PATCH 1/2] fix(windows): correct window restoration behavior after minimization - Replace SW_RESTORE with SW_SHOW flag - Resolves #4109 --- v2/internal/frontend/desktop/windows/winc/form.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/internal/frontend/desktop/windows/winc/form.go b/v2/internal/frontend/desktop/windows/winc/form.go index 8a42d63f3..c9acf7278 100644 --- a/v2/internal/frontend/desktop/windows/winc/form.go +++ b/v2/internal/frontend/desktop/windows/winc/form.go @@ -145,7 +145,7 @@ func (fm *Form) Restore() { SC_RESTORE, 0, ) - w32.ShowWindow(fm.hwnd, w32.SW_RESTORE) + w32.ShowWindow(fm.hwnd, w32.SW_SHOW) } // Public methods From 5df9ac1a5300cfeebe2ae54baa151be06af2ea62 Mon Sep 17 00:00:00 2001 From: "dingda.li" Date: Wed, 12 Mar 2025 15:43:20 +0800 Subject: [PATCH 2/2] docs: update changelog for window restoration fix --- website/src/pages/changelog.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 05128a6f3..0dcf1d089 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added "Branding" section to `wails doctor` to correctly identify Windows 11 [#3891](https://github.com/wailsapp/wails/pull/3891) by [@ronen25](https://github.com/ronen25) +### Fixed +- Fixed window restoration behavior after minimization by @superDingda in [#4109](https://github.com/wailsapp/wails/issues/4109) ## v2.10.1 - 2025-02-24