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 fractional scale updates in some cases #2447

Merged
merged 7 commits into from
Jun 6, 2023
Merged

Conversation

fberg
Copy link
Contributor

@fberg fberg commented Jun 5, 2023

Describe your PR, what does it fix/add?

The fractional scale of windows was not updated on "keyboard" moves (movecurrentworkspacetomonitor and movetoworkspace if the target workspace is on a different monitor), while it worked as expected when dragging a window with the mouse. Similar to #1794. Although that issue was already fixed, I am observing the same behavior on current main.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

This is my first time doing anything with Hyprland (or even Wayland for that matter), so not sure if I did it right.

In CWindow::moveToWorkspace(), the scale used appears to be the one from the previous monitor (where the window used to be), but I'm not sure if there are any unintended side-effects from setting m_iMonitorID. If that is bad, the scaling behavior was also fixed by only creating PMONITOR from PWORKSPACE->m_iMonitorID.

Is it ready for merging, or does it need work?

Apart from the above disclaimer, I think it's ready (for what it's worth). I tested it with two monitors of different scale (2.0 and 1.6), and alacritty as client.

src/Compositor.cpp Outdated Show resolved Hide resolved
src/Window.cpp Outdated Show resolved Hide resolved
src/Window.cpp Outdated Show resolved Hide resolved
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gangsta

@vaxerski vaxerski merged commit 4afeedb into hyprwm:main Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants