Merge branch 'wip/otte/for-main' into 'main'

inspector: Make really sure we don't inspect ourselves

See merge request GNOME/gtk!5599
This commit is contained in:
Benjamin Otte 2023-03-05 23:49:15 +00:00
commit 3ccf63b3c0

View File

@ -1131,11 +1131,19 @@ toplevel_filter_func (gpointer item,
gpointer data)
{
GdkDisplay *display = data;
gpointer iw;
if (!GTK_IS_WINDOW (item))
return FALSE;
return gtk_widget_get_display (item) == display;
if (gtk_widget_get_display (item) != display)
return FALSE;
iw = g_object_get_data (G_OBJECT (display), "-gtk-inspector");
if (iw == item)
return FALSE;
return TRUE;
}
static GListModel *