artizirk / wdisplays

Mirror of cyclopsian/wdisplays
https://web.archive.org/web/20210204184506/https://github.com/cyclopsian/wdisplays
Other
182 stars 14 forks source link

Wrong position when aligning screens #20

Open jheidbrink opened 3 weeks ago

jheidbrink commented 3 weeks ago

I have a 1440 pixels high external display. When I move my internal display below the external one, wdisplays has a snap function that I suppose should help to perfectly align the two displays. My 1440 pixels high display has a DPI scale of 1.1, so that should make the y position of the lower display 1309.0909 pixels. However, it snaps at a position of 1307 pixels. I'm using Sway, and the result of this alignment is that I cannot use Sway's movement keys to switch between displays. When manually setting the y position to 1309, switching works fine, and I can also still use the mouse to move the cursor from one display to the next.

alex-courtis commented 3 weeks ago

way-displays had a similar issue. Solution was to ensure that the displays were lined up exactly on logical size units.

There were isses with rounding vs truncating.

See https://github.com/alex-courtis/way-displays/issues/138 for description and https://github.com/alex-courtis/way-displays/pull/145 for fix