Skip to content
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 window resize on DPI changes #7735

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

nilsding
Copy link
Member

@nilsding nilsding commented Jan 9, 2025

This commit fixes #7678 (and likely fixes #7447 too, as it looks to be caused by the same underlying issue).

On Windows, when the screen is changed to one with a different scaling setting the window is being incorrectly resized. This can be worked around by storing the window's size before moving it to a different screen, and then resizing the window again.

tested the change on Win11, Linux (Plasma/Wayland), and macOS (with an iPad as second screen)

@nilsding nilsding added this to the 3.16.0 milestone Jan 9, 2025
@nilsding nilsding self-assigned this Jan 9, 2025
@nilsding nilsding force-pushed the bugfix/client-window-resize-on-scale-change branch from ae32d27 to 953d424 Compare January 13, 2025 10:34
@nilsding nilsding requested a review from camilasan January 13, 2025 10:35
This commit fixes #7678 and likely fixes #7447 too.  On Windows, when
the screen is changed to one with a different scaling setting the window
is being incorrectly resized.  This can be worked around by storing the
window's size before moving it to a different screen, and then resizing
the window again.

Signed-off-by: Jyrki Gadinger <[email protected]>
@nilsding nilsding force-pushed the bugfix/client-window-resize-on-scale-change branch from 953d424 to f352e8e Compare January 15, 2025 12:11
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-7735-f352e8e2155a1b6dc74077b1a6f1abc037f88f23-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)
5 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@nilsding nilsding merged commit 889fba6 into master Jan 15, 2025
13 of 17 checks passed
@nilsding nilsding deleted the bugfix/client-window-resize-on-scale-change branch January 15, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants