GNOME Bugzilla – Bug 538439
tooltip may appear in upper left corner instead of over widget
Last modified: 2009-02-12 06:47:27 UTC
Please describe the problem: A tooltip may appear in the upper left corner of the display instead of over its widget. This appears to occur when a "query-tooltip" handler is invoked with gtk_widget_trigger_tooltip_query() at one second intervals (by a timer handler). This behavior has been reproduced by Xfce developers. See: http://bugzilla.xfce.org/show_bug.cgi?id=4141 Steps to reproduce: 1. Compile and run the forthcoming test program. 2. Click on Button 1. 3. Actual results: The tooltip appears in the upper left corner instead of over the button. Expected results: The tooltip appears over the button. Does this happen every time? Yes. The tooltip may also appear in the upper left corner after moving the cursor into the button rectangle. (This method may require several tries.) Other information: gtk2-2.13.2-2.fc10.i386 glib2-2.17.2-1.fc10.i386
Created attachment 112774 [details] test program Compile and run this program from terminal window. Click on Button 1, wait one second. The tooltip appears in the upper left corner. This program is derived for the helloworld2.c example. A patch file will follow.
Example output from the test program. The x,y coordinates passed to the "query-tooltip" handler are negative when the tooltip appears in the upper left corner. 15: 1213531946.866928 (27,14) (0) 16: 1213531947.868039 (27,14) (0) Hello again - button 1 was pressed 17: 1213531948.867946 (27,14) (0) 18: 1213531948.927680 (-542,-495) (0) 19: 1213531949.869041 (27,14) (0) 20: 1213531950.870008 (27,14) (0)
Created attachment 112775 [details] [review] patch to helloworld2.c to produce test program In Fedora 9, helloworld2.c is here. /usr/share/doc/gtk2-devel-2.13.2/examples/helloworld2/helloworld2.c
(In reply to comment #2) ... > Hello again - button 1 was pressed > 17: 1213531948.867946 (27,14) (0) > 18: 1213531948.927680 (-542,-495) (0) The time interval between events 17 and 18 is 59.7 ms. The other events are separated by one second, as expected.
I am seeing a similar problem with Xfce svn, all tooltips in any random Gtk applications appear on the bottom right of the screen. Any pointers how that happens are welcome.
Created attachment 119585 [details] [review] fix This patch fixes the issues for me. Can somebody verify if this is also the case on xfce? If so, I will commit this on trunk and stable.
(In reply to comment #6) > Created an attachment (id=119585) [edit] > fix > > This patch fixes the issues for me. Can somebody verify if this is also the > case on xfce? If so, I will commit this on trunk and stable. I just tried the patch, no effect whatsoever. :(
After discovering that tooltips work fine in a Xephyr'd Xfce I actually tried to find the offernder. So I logged in with a fresh session - no effect. Then I also moved my xsettings.xml (the filename should be obvious) and logged in. Tada, tooltips work again. Even after manually selecting my old interface settings. To me this looks like a bug that was not triggered with old Gtk versions and only now comes to the surface. However after comparing my old and my new settings files I fail to see what was different. :-/
Hi, I'm the maintainer of the Xfce panel plugin from the referenced Xfce bug #4141. (In reply to comment #6) > Created an attachment (id=119585) [edit] > fix > > This patch fixes the issues for me. Can somebody verify if this is also the > case on xfce? If so, I will commit this on trunk and stable. Yep, this fixed it for me, too. I just added this patch to Debian's gtk+2.0-2.12.11, and my tooltips now behave correctly - both on the panel plugin and on the test program. It'd be great if you could commit this patch. (In reply to comment #8) > After discovering that tooltips work fine in a Xephyr'd Xfce I actually tried > to find the offernder. So I logged in with a fresh session - no effect. Then I > also moved my xsettings.xml (the filename should be obvious) and logged in. > Tada, tooltips work again. Even after manually selecting my old interface > settings. I don't think I even have an xsettings.xml. It sounds like we had separate issues.
I can't say anything about xfce, but I've had the same problem in rhythmbox ever since it started using GtkTooltip instead of SexyTooltip for its tray icon, and this patch fixes it.
It now seems that this bug repros in many many applications running on Ubuntu Jaunty. I can easily reproduce it in totem using the daily build live CD for example, and I've also seen it in Firefox. Ubuntu bug report is available here: https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/321580
*** Bug 570395 has been marked as a duplicate of this bug. ***
* gtk/gtktooltip.c (gtk_tooltip_trigger_query): Set the root coordinates in the event correctly. Patch by Kristian Rietveld.
*** Bug 571382 has been marked as a duplicate of this bug. ***