<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - gtk_window_move() unreliable in Wayland?"
href="https://bugzilla.gnome.org/show_bug.cgi?id=757558#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - gtk_window_move() unreliable in Wayland?"
href="https://bugzilla.gnome.org/show_bug.cgi?id=757558">bug 757558</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=jadahl%40gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span></b>
<pre>Thanks for the reproducer. I had a look at it and I could make the popup map
correctly by doing three changes:
1. set_transient_for() was moved to just before show(). The reason for this was
that toplevel was NULL on init(), i.e. no transiency was established. This was
warned in stderr as "Gdk-WARNING **: Couldn't map as window 0xc8e450 as popup
because it doesn't have a parent"
2. I moved show() to *after* the device grab. This was warned in stderr as
"Gdk-WARNING **: Couldn't map window 0xa20450 as popup because no grabbed seat
found".
This is needed because the popup window is shown in a response to an input
event. The GDK backend needs to know where the input event came from when
mapping, and the only way to do that is via device grabs.
Though that was not enough. One last thing was needed.
3. I removed keyboard = ... when the source event came from a pointer.
Regarding the need for part 3, there are 2 issues that needs resolving, one in
GDK and one in the reproducer. In the reproducer, one should not grab the
keyboard when the event came from a pointer, because that way the GDK backend
thinks the keyboard was the source of the event. In effect, it will not be able
to map the popup, because it doesn't have a valid serial.
The other problem, in the GDK backend, is that popup mapping seems to be
hardcoded to only function as a response to mouse clicks (see
gdk_wayland_window_create_xdg_popup()).</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>