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.
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 *