-
Notifications
You must be signed in to change notification settings - Fork 65
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
Get desktop bounds correctly on X11 #101
base: main
Are you sure you want to change the base?
Conversation
I fixed the issue with Windows and OSX builds not compiling (I accidentally included an X11-specific file into the global sources instead of the linux sources 😅), however the Ubuntu target failed to compile with the complaint that Xrandr was not found and I am not sure why. For the time being this compile error fix has been rebased onto the first commit I made. |
Appending the |
Use Xrandr's XRRGetMonitors function to find find the position, bounds, and "main screen" status of all monitors. On X11, there is no supported method to find the workarea of a monitor. This includes the _NET_WORKAREA atom, which breaks multi-monitor setups. This may not be an issue as most window managers aggressively and correctly enforce their, albeit private, workarea for windows.
Introduce parity to X11 from Windows. Respect per-monitor bounds.
Thanks for this @ajerick, it will take me some time to test this PR with a proper scenario (multiple monitors), but I'm planning to merge it. |
I was testing this PR to merge it (at least on In current
With this PR,
|
Partially fix aseprite issue 3118.
X11 was never made with multi-monitor support in mind and, as a result, finding the workarea on multi-monitor setups is impossible without awful hacks. Instead, use the Xrandr X11 extension to query monitors, and their properties, to replace X11's display property in the operating-system level "Screen" implementation.
With this patch, screen bounds will be correct on multi-monitor setups in X11 however the illusive workarea property will mirror the bounds.
I agree that my contributions are licensed under the MIT License.