After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766377 - tooltip from xwayland app is still on screen when I alternate to a Wayland app
tooltip from xwayland app is still on screen when I alternate to a Wayland app
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-05-13 14:31 UTC by Strangiato
Modified: 2016-06-23 06:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bug demonstration (797.74 KB, video/webm)
2016-05-13 14:31 UTC, Strangiato
Details

Description Strangiato 2016-05-13 14:31:23 UTC
Created attachment 327794 [details]
bug demonstration

steps to reproduce
open Firefox and nautilus, put the mouse pointer on any bookmark bar item and wait the tooltip appears
press super keyboard key and select nautilus window
Result: tooltip from Firefox is still on screen
Watch the video please.
Comment 1 Florian Müllner 2016-05-13 14:41:09 UTC
This is reproducible on X11 as well. Unless you can reproduce the issue with a different XWayland app, it's like this[0] Firefox issue.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=411268
Comment 2 Strangiato 2016-05-13 14:43:53 UTC
I can reproduce using Opera browser instead Firefox too.
Comment 3 Florian Müllner 2016-05-13 14:54:20 UTC
Can you reproduce with the following:

GDK_BACKEND=x11 gtk3-demo --run=toolpalette
Comment 4 Strangiato 2016-05-13 14:58:13 UTC
Yes, I get the same result.
Comment 5 Olivier Fourdan 2016-06-07 06:59:54 UTC
Yes, I can reproduce as well using gnome-shell's window picker (but not alt-tab)
Comment 6 Olivier Fourdan 2016-06-07 13:20:09 UTC
Under X11, breaking on gtk_tooltip_hide_tooltip() in gtk/gtktooltip.c we see that the event that hides the tooltip is a leave notify event:

Thread 1 "gtk3-demo" hit Breakpoint 1, gtk_tooltip_hide_tooltip (tooltip=tooltip@entry=0xd06cc0) at gtktooltip.c:1161
1161	  if (!tooltip)
(gdb) bt
  • #0 gtk_tooltip_hide_tooltip
    at gtktooltip.c line 1161
  • #1 gtk_tooltip_handle_event_internal
    at gtktooltip.c line 1511
  • #2 _gtk_tooltip_handle_event
    at gtktooltip.c line 1413
  • #3 gtk_main_do_event
    at gtkmain.c line 1941
  • #4 _gdk_event_emit
    at gdkevents.c line 73
  • #5 gdk_event_source_dispatch
    at gdkeventsource.c line 367
  • #6 g_main_dispatch
    at gmain.c line 3165
  • #7 g_main_context_dispatch
    at gmain.c line 3780
  • #8 g_main_context_iterate
    at gmain.c line 3851
  • #9 g_main_context_iteration
    at gmain.c line 3912
  • #10 g_application_run
    at gapplication.c line 2381
  • #11 main
    at main.c line 1180
  • #1 gtk_tooltip_handle_event_internal
    at gtktooltip.c line 1511

(gdb) p *event
$1 = {type = GDK_LEAVE_NOTIFY, any = {type = GDK_LEAVE_NOTIFY, window = 0xcf9730, send_event = 0 '\000'}, ... crossing = {type = GDK_LEAVE_NOTIFY, window = 0xcf9730, send_event = 0 '\000', subwindow = 0xcf9e60, time = 997932303, x = 177, y = 148, x_root = 2211, y_root = 387, mode = GDK_CROSSING_NORMAL, detail = GDK_NOTIFY_NONLINEAR_VIRTUAL, focus = 0, state = 0}, ... }

Under Wayland, there is no such leave notify event received and the tooltip is not hidden when the window picker is involved, and therefore shows up again after another window is picked.
Comment 7 Olivier Fourdan 2016-06-07 15:45:33 UTC
Humm, I probably got confused with the "mode = GDK_CROSSING_NORMAL" reported in the GdkEvent in my comment 6, using GDK_DEBUG=events instead, we see that the crossing mode is actually 1 so taht would be GDK_CROSSING_GRAB, i.e. it's the LeaveNotify event generated by the pointer grab:

Gdk-Message: leave notify:	window 37748790
	subwindow:0
	device: 2
	source device: 2
	notify type: 3
	crossing mode: 1

Which explains why we won't get these under Wayland...
Comment 8 Olivier Fourdan 2016-06-08 12:10:47 UTC
Actually, even without a grab, I reckon we should still receive a LeaveNotify event because the pointer has left the Xwayland window for a native Wayland surface mapped by gnome-shell, but we don't. And we did, gtk+ would unmap the tooltip.

So, filed bug https://bugs.freedesktop.org/show_bug.cgi?id=96437 for Xwayland and the patch submitted there would fix this issue as well (AFAICS)
Comment 9 Olivier Fourdan 2016-06-23 06:54:01 UTC
The fix in Xwayland has landed in xserver upstream, closing this bug.