mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
inspector: Make really sure we don't inspect ourselves
The problem here is that new windows appear in the list before the window's dispay gets set and we don't update the filter when the display changes (would need watches support for the filtermodel). So add this somewhat hacky method.
This commit is contained in:
parent
0fa1e71ef0
commit
4655226907
@ -1131,11 +1131,19 @@ toplevel_filter_func (gpointer item,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GdkDisplay *display = data;
|
GdkDisplay *display = data;
|
||||||
|
gpointer iw;
|
||||||
|
|
||||||
if (!GTK_IS_WINDOW (item))
|
if (!GTK_IS_WINDOW (item))
|
||||||
return FALSE;
|
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 *
|
static GListModel *
|
||||||
|
Loading…
Reference in New Issue
Block a user