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 156640 - gtktooltip requires enter_notify to get started
gtktooltip requires enter_notify to get started
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.4.x
Other Linux
: Normal normal
: Small feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-10-27 20:52 UTC by Felipe Heidrich
Modified: 2007-03-13 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
snippet (1019 bytes, text/plain)
2004-10-27 20:53 UTC, Felipe Heidrich
  Details
quick and dirty patch to fix this bug (1.09 KB, patch)
2006-01-07 21:25 UTC, Alexandre Muniz
none Details | Review

Description Felipe Heidrich 2004-10-27 20:52:13 UTC
GtkToolTip starts to work (gtk_tooltips_start_delay) after a GDK_ENTER_NOTIFY,
if the widget calls gtk_tooltips_set_tip with the pointer inside its bounds the
tooltip will only show when the pointer reenter the widget.

Compile & Run the snippet to see the problem.
Comment 1 Felipe Heidrich 2004-10-27 20:53:33 UTC
Created attachment 33146 [details]
snippet

Related with SWT bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=73390
Comment 2 Alexandre Muniz 2006-01-07 21:25:36 UTC
Created attachment 56935 [details] [review]
quick and dirty patch to fix this bug

There is probably a more correct way to determine if the pointer is within a widget, but I couldn't find it. This will not behave correctly with shaped widgets, and the choice of < vs. <= was a total guess. But once the condition is replaced with whatever is correct, this patch should be good. And nearly all of the time this quick and dirty fix should be better than the unpatched behavior.

My fix in progress for Bug 125644 becomes much nicer once this is fixed, so I'm inclined to make this a blocker for it.
Comment 3 Felipe Heidrich 2006-06-19 20:15:47 UTC
what is the status of this? is there an ETA for a fix?
Comment 4 Xan Lopez 2007-02-28 17:15:07 UTC
Kris, does this work with the new implementation?
Comment 5 Kristian Rietveld 2007-03-13 13:11:00 UTC
(In reply to comment #4)
> Kris, does this work with the new implementation?

Yes, the new implementation will start the delay after a motion event, an enter notify event is not required. It does require a motion event though, so if you set the tooltip in a motion event handler, you need to move the pointer a little bit before the tooltip delay will be started.