[Wayland-bugs] [Bug 766566] New: Wayland: gdk_screen_get_monitor_at_window() unreliable under Wayland

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Tue May 17 13:39:52 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=766566

            Bug ID: 766566
           Summary: Wayland: gdk_screen_get_monitor_at_window() unreliable
                    under Wayland
    Classification: Platform
           Product: gtk+
           Version: unspecified
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Backend: Wayland
          Assignee: gtk-bugs at gtk.org
          Reporter: ofourdan at redhat.com
        QA Contact: gtk-bugs at gtk.org
                CC: rob at robster.org.uk, wayland-bugs at lists.freedesktop.org
     GNOME version: ---

Description:

Wayland has no global coordinates, unfortunately this is what
gdk_screen_get_monitor_at_window() and gdk_display_get_monitor_at_window() use
to identify the monitor where the window resides.

How reproducible:

100%

Steps to reproduce:

1. Build gtk+
2. Run ./tests/testxinerama under Wayland with a dual monitor setup
3. Move the window from monitor to the other and press "Query current monitor"

Actual results:

The values displays by "Query current monitor" are always the same, even if the
window is moved from a monitor to the other.

Expected results:

The monitor is updated when the window is queried from different monitors.

Additional info:

gdk_screen_get_monitor_at_window()/gdk_display_get_monitor_at_window() use the
window location to identify the monitor, but there is no such thing in Wayland,
as a result, it's always the first monitor which is returned.

But Wayland compositors do notify the surfaces when they enter and leave
outputs, so the idea would be to add a vfunc to let the backends return a
monitor for a given GdkWindow, and if the vfunc is not available, use the
current method of testing coordinates.

Proposed patches to follow.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160517/bf87ed21/attachment-0001.html>


More information about the wayland-bugs mailing list