-
Notifications
You must be signed in to change notification settings - Fork 937
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
On Windows, fix window size for maximized, undecorated windows #2584
On Windows, fix window size for maximized, undecorated windows #2584
Conversation
Co-authored-by: Amr Bashir <[email protected]>
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.
Thank you for the attribution, unfortunately a bug with this code came to light since then, see below.
if util::is_maximized(window) { | ||
// Limit the window size when maximized to the current monitor. | ||
// Otherwise it would include the non-existent decorations. | ||
let monitor = monitor::current_monitor(window); |
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.
using monitor::current_monitor
which uses MonitorFromWindow
and MONITOR_DEFAULTTONEAREST
is unreliable in this situation, see MicrosoftEdge/WebView2Feedback#2549 (comment), instead, MonitorFromRect
should be used
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.
thanks for mentioning this! I will adjust it accordingly
@msiglreith is this good to go? |
not yet, I will update it today |
# Conflicts: # CHANGELOG.md
…ed-undecorated # Conflicts: # CHANGELOG.md # src/platform_impl/windows/util.rs
Mostly takes the relevant pieces from #1891 regarding max window handling which haven't been included so far.
Attributed @amrbashir in the commit accordingly, I hope that's fine!
Fixes #2568
CHANGELOG.md
if knowledge of this change could be valuable to users