Skip to content

Commit

Permalink
fix(windows): Ignore resize event when minimizing frameless windows (#…
Browse files Browse the repository at this point in the history
…909)

* fix(windows): Do not toggle webview visibility when minimizing

* Update .changes/frameless-minimize-windows.md

---------

Co-authored-by: ahodesuka <[email protected]>
  • Loading branch information
ahodesuka and ahodesuka authored Mar 24, 2023
1 parent e3ca886 commit f76568a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changes/frameless-minimize-windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Revert [`51b49c54`](https://github.com/tauri-apps/wry/commit/51b49c54e41c71d1c5f03b568094d43fb9dc32ac) which hid the webview when minimized on Windows.
10 changes: 0 additions & 10 deletions src/webview/webview2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,6 @@ window.addEventListener('mousemove', (e) => window.chrome.webview.postMessage('_
right: client_rect.right - client_rect.left,
bottom: client_rect.bottom - client_rect.top,
});

if wparam == WPARAM(win32wm::SIZE_MINIMIZED as _) {
let _ = (*controller).SetIsVisible(false);
}

if wparam == WPARAM(win32wm::SIZE_RESTORED as _)
|| wparam == WPARAM(win32wm::SIZE_MAXIMIZED as _)
{
let _ = (*controller).SetIsVisible(true);
}
}

win32wm::WM_SETFOCUS | win32wm::WM_ENTERSIZEMOVE => {
Expand Down

0 comments on commit f76568a

Please sign in to comment.