Skip to content

Apply scaling to virtual monitor reported size#439

Open
flodavid wants to merge 1 commit intoelementary:mainfrom
flodavid:fix-multi-monitor-scaling
Open

Apply scaling to virtual monitor reported size#439
flodavid wants to merge 1 commit intoelementary:mainfrom
flodavid:fix-multi-monitor-scaling

Conversation

@flodavid
Copy link

This fixes an issue where you could not apply a layout where a monitor on the left or on top of another monitor has scaling over 100%, because the configuration would contain gaps and the following error would be raised:
image
This is because the screen origin is at its top-left. When scaling is applied, the monitor area is smaller, which creates gaps on its right and bottom sides that were not took into account.

This PR resize the monitor area when scaling is modified, logically and visually, so the monitor can be adjacent. Moreover, the user can now see what the real area of the monitor will be.

I did not found an existing issue reporting this, but it could related to #435.

@lobre
Copy link

lobre commented Mar 22, 2026

This is related to #436.

@lobre
Copy link

lobre commented Mar 22, 2026

If I understood the problem correctly, this issue is more than just rounding up, as the geometry is not handled with logical coordinates while I believe it should. But I may be wrong.

@flodavid
Copy link
Author

flodavid commented Mar 22, 2026

If I understood the problem correctly, this issue is more than just rounding up, as the geometry is not handled with logical coordinates while I believe it should. But I may be wrong.

Yes it is not just rounding up. In added the comment to explain why I added 0.49 before after applying the scaling, but before the conversion to int.

@flodavid flodavid force-pushed the fix-multi-monitor-scaling branch from b0741f3 to 20e5a00 Compare March 22, 2026 16:25
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