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

Moving window between displays with different UI scaling doesn't cause a re-layout #2479

Open
dapetcu21 opened this issue Apr 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dapetcu21
Copy link

Describe the bug
When moving the window between two screens with different DPI scaling, the font size doesn't re-scale accordingly.
As a workaround, resizing the window afterwards forces a re-layout.

To Reproduce
Steps to reproduce the behavior:

  1. Open Neovide
  2. Move it to a display with different DPI scaling

Expected behavior
The font size should re-adjust and the window should re-draw.

Screenshots
Higher DPI scale -> Lower DPI scale:
image

Lower DPI scale -> Higher DPI scale:
image

Desktop (please complete the following information):

  • OS: Windows 10.0.19044
  • Neovide Version 0.12.2
  • Neovim Version 0.9.5

Please run neovide --log and paste the contents of the .log file created in the current directory here:
neovide_backtraces.log
neovide_rCURRENT.log

Additional context
Windows has some pretty weird handling of DPI awareness:
https://learn.microsoft.com/en-us/windows/win32/hidpi/setting-the-default-dpi-awareness-for-a-process
https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows

@dapetcu21 dapetcu21 added the bug Something isn't working label Apr 10, 2024
@fredizzimo fredizzimo changed the title Windows: Moving window between displays with different UI scaling doesn't cause a re-layout Moving window between displays with different UI scaling doesn't cause a re-layout May 13, 2024
@fredizzimo
Copy link
Member

It looks like Neovide reacts to scale factor changes at least on Linux Wayland. I don't have a dual monitor setup right now, so I just changed the system settings.

It's still possible that other platforms are broken, or that only moving the window to another screen works differently than the global winit scale factor event for the Window.

If you could test if it reacts to setting the scale factor from the system settings it would be good, because then there's one thing less for me to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants