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 457642 - no tooltips on notebook's tab labels
no tooltips on notebook's tab labels
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-07-17 14:05 UTC by Christian Persch
Modified: 2007-08-21 11:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (887 bytes, text/plain)
2007-07-17 14:08 UTC, Christian Persch
  Details
Proposed patch (use the first parent widget of the event_widget with an own GdkWindow) (958 bytes, patch)
2007-07-24 17:03 UTC, Jan Arne Petersen
none Details | Review
debugging info, comments, attempt at fixing (5.68 KB, patch)
2007-08-10 15:23 UTC, Kristian Rietveld
accepted-commit_now Details | Review
missing tooltip.c comments (1.43 KB, text/x-patch)
2007-08-21 10:35 UTC, Tim Janik
  Details

Description Christian Persch 2007-07-17 14:05:56 UTC
Steps to reproduce:
0) Compile & run the attached testcase
1) Hover the mouse over the top notebook's tab label
2) Hover the mouse over the bottom notebook's tab label

Expected results:
Shows tooltip on both tab labels.

Actual results:
Tooltip shows only on the top notebook!
Comment 1 Christian Persch 2007-07-17 14:08:33 UTC
Created attachment 91893 [details]
testcase
Comment 2 Jan Arne Petersen 2007-07-24 17:03:38 UTC
Created attachment 92291 [details] [review]
Proposed patch (use the first parent widget of the event_widget with an own GdkWindow)

Tested with GtkNotebook and the GtkColorSelectionDialog.
Comment 3 Kristian Rietveld 2007-07-26 15:04:51 UTC
Please don't commit this until I've had a chance to very closely look at this after my holiday.  I possibly need to have Tim look at this too.

Comment 4 Kristian Rietveld 2007-08-10 15:22:32 UTC
Okay, I did my own go on debugging this, and it took quite a while ... While debugging I added some debugging printfs with defines and annotated the source with comments explaining in which coordinate system the coordinates currently are.

While doing this I figured that the current sequence of coordinate translations was not fully right.  The patch which I will be attaching does an attempt on fixing this.  It does fix the notebook tab label problem and makes the opacity slider in the color selector work.  I think there is a possibility that it gets the coordinates which are sent to query-tooltip wrong in some cases, but that can be fixed later on.


Tim, could you look at this patch and see if the newly added comments are right and what we want, and whether this patch is actually correctly fixing the problem?

Personally, I feel that the patch in comment 2 is not the right approach -- the widget finder should work without first going to the first widget with its own widget->window.


I will look at fixing spin buttons later.
Comment 5 Kristian Rietveld 2007-08-10 15:23:31 UTC
Created attachment 93443 [details] [review]
debugging info, comments, attempt at fixing
Comment 6 Jan Arne Petersen 2007-08-10 20:55:04 UTC
I prefer your patch in comment 5 to my patch in comment 2, too.

The problem with the spin buttons is raised because the spin_button->panel window is not a child of spin_button->window but of spin_button->parent->window (with spin_button->window != spin_button->parent->window).
Comment 7 Jan Arne Petersen 2007-08-12 20:19:00 UTC
see also bug 466000
Comment 8 Tim Janik 2007-08-21 10:32:59 UTC
Comment on attachment 93443 [details] [review]
debugging info, comments, attempt at fixing

>@@ -567,10 +598,20 @@ find_widget_under_pointer (GdkWindow *wi
>       gtk_container_forall (GTK_CONTAINER (event_widget),
> 			    child_location_foreach, &child_loc);
> 
>+      /* Here we have a widget, with coordinates relative to
>+       * child_loc.contaoner->window.

this comment is wrong (as discussed on jabber), it should be:
  /* Here we have a widget, with coordinates relative to
   * child_loc.container's allocation.
   */
Comment 9 Tim Janik 2007-08-21 10:35:43 UTC
Created attachment 94040 [details]
missing tooltip.c comments

Kris, your patch looks good and can go in, provided the comment outlined previously is fixed. as discussed on the phone, please also add the comments from this patch which i'm not applying directly to avoid conflicts.
Comment 10 Kristian Rietveld 2007-08-21 10:55:27 UTC
Committed r18663.