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

compositor: fix getMonitorFromVector returning wrong monitor #6010

Merged
merged 1 commit into from
May 11, 2024

Conversation

sungyoonc
Copy link
Contributor

Describe your PR, what does it fix/add?

Fixes #5977
Related #5973 (This fixes my issues with firefox, but not sure if the OP's issue is same as mine)

When the second monitor is placed right next to the main monitor, getMonitorFromVector() will return the main monitor when it is supplied with the pos of the top left corner of the second monitor.

For example,
main monitor pos: 0x0, size: 1920x1080
second monitor pos:1920x0, size 1920x1080

In this case when you try to get the monitor with a vector (1920, 0)(e.g. fullscreened firefox, layershell anchored to top left), it will get the main monitor instead of the second monitor.

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

I don't know if changing the VECINRECT macro like this would break other parts of the code that uses this macro.

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

Ready if this change isn't a wrong approach

@sungyoonc sungyoonc changed the title compositor: fix getMonitorFromVector getting wrong monitor compositor: fix getMonitorFromVector returning wrong monitor May 11, 2024
@vaxerski vaxerski merged commit 3529fbc into hyprwm:main May 11, 2024
10 checks passed
@sungyoonc sungyoonc deleted the fix-monitor-from-vec branch May 11, 2024 14:39
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.

Waybar and ags's popup not working
2 participants