-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Wrong monitor positions reported on latest GTK3 release #8164
Comments
This is a nasty hack, which will hopefully only be temporary. See swaywm/sway#8164 for details
This is a nasty hack, which will hopefully only be temporary. See swaywm/sway#8164 for details
wlroots sends 0,0 as the position via Sounds like a GTK bug. Can you run your demo with |
The weird thing is the GTK commit seems to suggest the opposite? The logs do seem to back up your theory though, I think. You can see
|
Sway Version: Git (dcdb727)
Wlroots Version: Git (325d84381)
Description:
The latest GTK 3.24 release (3.24.42) includes a fix described as "Fix monitor sizes".
https://gitlab.gnome.org/GNOME/gtk/-/commit/51b04c5007f89142ed5a1ab240c03d5800b86b3d
This seems to have inadvertently caused some issues on wlroots-based compositors, whereby the
gdk_monitor_get_geometry
function now returns0, 0
for the position of every monitor.This issue did not occur prior to the GTK update.
I have tested it on the following:
On Gnome/KDE the positions are reported correctly, however the bug occurs on both Sway and Hyprland. I suspect this therefore may be wlroots related, but have opened the issue here first as per the wlroots repo instructions.
A basic reproduction can be seen with the following Python 3 script:
Results in:
# incorrect λ python gtk-test.py 0 0 2560 1440 0 0 1920 1080 0 0 2560 1440
In my case I have 3 horizontally aligned monitors, so I would expect the X positions to be offset by their widths according to their alignment:
# correct λ python gtk-test.py 1080 0 2560 1440 0 0 1920 1080 2520 0 2560 1440
The effect of this is that the
gdk_display_get_monitor_at_point
function now returns the 1st monitor always.If you need any more info, let me know.
The text was updated successfully, but these errors were encountered: