-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(windows): Ignore resize event when minimizing frameless windows #909
Conversation
LGTM but I want to know @amrbashir 's feedback. |
src/webview/webview2/mod.rs
Outdated
if wparam == WPARAM(win32wm::SIZE_MINIMIZED as _) { | ||
let _ = (*controller).SetIsVisible(false); | ||
let _ = controller.SetIsVisible(false); | ||
} | ||
|
||
if wparam == WPARAM(win32wm::SIZE_RESTORED as _) | ||
|| wparam == WPARAM(win32wm::SIZE_MAXIMIZED as _) | ||
{ | ||
let _ = (*controller).SetIsVisible(true); | ||
let _ = controller.SetIsVisible(true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert all the changes and just remove the visibility handling, and it should be good. This doesn't need to be only for frameless windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…909) * fix(windows): Do not toggle webview visibility when minimizing * Update .changes/frameless-minimize-windows.md --------- Co-authored-by: ahodesuka <ahodesuka@users.noreply.github.com>
…909) * fix(windows): Do not toggle webview visibility when minimizing * Update .changes/frameless-minimize-windows.md --------- Co-authored-by: ahodesuka <ahodesuka@users.noreply.github.com>
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
Other information
I am by no means an experienced Rust programmer so if there's a better way of getting the
Rc<Window>
into theSetWindowSubclass
callback let me know.Here is the issue that this PR resolves, it is very noticeable here because I'm displaying a large image in the webview.
before-change.mp4
And with these changes it looks like this:
after-change.mp4