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 538439 - tooltip may appear in upper left corner instead of over widget
tooltip may appear in upper left corner instead of over widget
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.13.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 570395 571382 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-15 12:00 UTC by Steve Tyler
Modified: 2009-02-12 06:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test program (3.92 KB, text/plain)
2008-06-15 12:11 UTC, Steve Tyler
  Details
patch to helloworld2.c to produce test program (1.29 KB, patch)
2008-06-15 12:20 UTC, Steve Tyler
none Details | Review
fix (453 bytes, patch)
2008-09-29 13:44 UTC, Kristian Rietveld
committed Details | Review

Description Steve Tyler 2008-06-15 12:00:45 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
Comment 1 Steve Tyler 2008-06-15 12:11:51 UTC
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.
Comment 2 Steve Tyler 2008-06-15 12:15:50 UTC
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)
Comment 3 Steve Tyler 2008-06-15 12:20:33 UTC
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
Comment 4 Steve Tyler 2008-06-19 18:21:00 UTC
(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.

Comment 5 Christian Dywan 2008-09-10 13:11:44 UTC
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.
Comment 6 Kristian Rietveld 2008-09-29 13:44:44 UTC
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.
Comment 7 Christian Dywan 2008-09-29 15:11:10 UTC
(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. :(
Comment 8 Christian Dywan 2008-09-30 10:01:07 UTC
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. :-/
Comment 9 Diego Ongaro 2008-11-22 05:22:19 UTC
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.
Comment 10 Jonathan Matthew 2009-01-02 03:29:16 UTC
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.
Comment 11 Martin Olsson 2009-02-02 11:16:36 UTC
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
Comment 12 Jonathan Matthew 2009-02-03 23:08:28 UTC
*** Bug 570395 has been marked as a duplicate of this bug. ***
Comment 13 Matthias Clasen 2009-02-04 01:18:39 UTC
        * gtk/gtktooltip.c (gtk_tooltip_trigger_query): Set the root
        coordinates in the event correctly. Patch by Kristian Rietveld.

Comment 14 Magnus Boman 2009-02-12 06:47:27 UTC
*** Bug 571382 has been marked as a duplicate of this bug. ***