We do get events on the tooltip window too, and
we better ignore them, or bad things may happen,
such as widgets that are their own parents and
cause infinite loops.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2339
if (tooltip->native == native)
return;
+ if (GTK_IS_TOOLTIP_WINDOW (native))
+ return;
+
if (tooltip->native)
g_object_weak_unref (G_OBJECT (tooltip->native), native_weak_notify, tooltip);
gtk_tooltip_window_set_relative_to (GtkTooltipWindow *window,
GtkWidget *relative_to)
{
+ g_return_if_fail (GTK_WIDGET (window) != relative_to);
+
if (window->relative_to == relative_to)
return;