-
Notifications
You must be signed in to change notification settings - Fork 932
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
Reload DPI on PropertyChange #3222
Conversation
Supersedes #2874, fixes #1228 Signed-off-by: John Nunley <[email protected]>
This is amazing! Thank you 😍 |
How would this be done? |
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.
You'd need a changelog entry for that.
Cursors are server side on X11, so it's up to it to resize the cursor, not winit. |
Signed-off-by: John Nunley <[email protected]>
The error here appears to be spurious |
for (_, window) in wt.windows.borrow().iter() { | ||
if let Some(window) = window.upgrade() { | ||
window.refresh_dpi_for_monitor( | ||
&new_monitor, | ||
maybe_prev_scale_factor, | ||
&mut *callback, | ||
) | ||
} | ||
} |
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.
I think you can move upgrade
part into iterator by doing filter_map
? So it'll be even less nesting.
if let Some(prev_list) = prev_list { | ||
let new_list = wt | ||
.xconn | ||
.available_monitors() | ||
.expect("Failed to get monitor list"); |
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.
This really demands early return with match
.
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Supersedes #2874, fixes #1228
CHANGELOG.md
if knowledge of this change could be valuable to users