<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Wayland: gdk_screen_get_monitor_at_window() unreliable under Wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=766566">766566</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Wayland: gdk_screen_get_monitor_at_window() unreliable under Wayland
</td>
</tr>
<tr>
<th>Classification</th>
<td>Platform
</td>
</tr>
<tr>
<th>Product</th>
<td>gtk+
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>Normal
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: Wayland
</td>
</tr>
<tr>
<th>Assignee</th>
<td>gtk-bugs@gtk.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ofourdan@redhat.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>gtk-bugs@gtk.org
</td>
</tr>
<tr>
<th>CC</th>
<td>rob@robster.org.uk, wayland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>GNOME version</th>
<td>---
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>