GNOME Bugzilla – Bug 763017
tooltip text is not shown
Last modified: 2016-03-08 16:14:01 UTC
tooltip text has not been shown since gtk 3.18. I just called gtk_widget_set_tooltip_text(): button = gtk_button_new_with_label ("test"); gtk_widget_set_tooltip_text (button, "test"); It seems hovering is not detected. This problem does not happen in gtk 3.16.
It works in a quick test here. So I probably need a complete testcase that fails for you.
Created attachment 323061 [details] Test program The problem can be reproduced in Fedora 23 and 24 but does not happen in Fedora 22 or lower. I'm attaching the a.c
Created attachment 323062 [details] Screencast for the test failure Attached the screencast recording in Fedora 24, which reproduces the problem.
This problem does not happen in Wayland.
Sorry, this problem does not happen in Xorg in another machine. I'm using a virtual host.
gdk/x11/gdkdevicemanager-xi2.c:create_device() checks dev->name and my virtual host returns "Virtual core pointer" and "Virtual core XTEST pointer" and "VirtualBox USB Tablet". "Virtual core pointer" and "Virtual core XTEST pointer" makes input_source GDK_SOURCE_MOUSE. "VirtualBox USB Tablet" makes input_source GDK_SOURCE_MOUSE in GTK 3.16. "VirtualBox USB Tablet" makes input_source GDK_SOURCE_TOUCHSCREEN in GTK 3.18. https://git.gnome.org/browse/gtk+/commit/?id=29dd395b7a5b8af0af55c12763e470f1daec287b gtk/gtktooltip.c:tooltips_enabled() returns FALSE in GTK 3.18 because gdk_device_get_source (source_device) is GDK_SOURCE_TOUCHSCREEN and cannot show the tooltip. Currently I cannot run GNOME Wayland in the virtual host so no test in it. The workaround is to install VBoxGuestAdditions and "VirtualBox mouse integration" will be used instead of "VirtualBox USB Tablet".
Created attachment 323396 [details] [review] Patch for gdkdevicemanager-xi2.c I confirmed this patch can resolve the tooltip problem.