GNOME Bugzilla – Bug 457642
no tooltips on notebook's tab labels
Last modified: 2007-08-21 11:05:19 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!
Created attachment 91893 [details] testcase
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.
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.
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.
Created attachment 93443 [details] [review] debugging info, comments, attempt at fixing
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).
see also bug 466000
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. */
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.
Committed r18663.