[Wayland-bugs] [Bug 757558] gtk_window_move() unreliable in Wayland?

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Thu Nov 5 00:56:29 PST 2015


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

--- Comment #11 from Jonas Ã…dahl <jadahl at gmail.com> ---
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()).

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


More information about the wayland-bugs mailing list