[gtk/fix-menubutton-tooltips] Limit tooltip queries to the same native




commit 27295bc5553a5eb986bfc6f989b6133a3aba2acd
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 11 08:56:05 2021 -0500

    Limit tooltip queries to the same native
    
    Without this, the menubuttons tooltip pops up
    when hovering the popover, which is suprising
    and unintended.
    
    Fixes: #3719

 gtk/gtktooltip.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index a192d1eb0d..bb33088632 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -548,6 +548,9 @@ gtk_tooltip_run_requery (GtkWidget  **widget,
               double xx = *x;
               double yy = *y;
 
+              if (gtk_widget_get_native (parent) != gtk_widget_get_native (*widget))
+                break;
+
               gtk_widget_translate_coordinates (*widget, parent, xx, yy, &xx, &yy);
 
               *x = xx;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]