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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]
     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.
_______________________________________________
wayland-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to