From 95d9a95b2b614f46b92fc7df4d2e1b1c0b4a901e Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 11 Sep 2014 10:18:21 -0400 Subject: [PATCH] Add meta_ui_window_is_dummy() For reasons related to interaction between the GTK+ CSS code and the frame sync protocol, the dummy GtkWindow that MetaUI creates to track theme properties has to be mapped and have MetaWindow associated with it. Add a private function so that the test framework can filter this out. https://bugzilla.gnome.org/show_bug.cgi?id=736505 --- src/ui/ui.c | 8 ++++++++ src/ui/ui.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/ui/ui.c b/src/ui/ui.c index 963be7c1a..438188072 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -653,3 +653,11 @@ meta_ui_window_is_widget (MetaUI *ui, else return FALSE; } + +gboolean +meta_ui_window_is_dummy (MetaUI *ui, + Window xwindow) +{ + GdkWindow *frames_window = gtk_widget_get_window (GTK_WIDGET (ui->frames)); + return xwindow == gdk_x11_window_get_xid (frames_window); +} diff --git a/src/ui/ui.h b/src/ui/ui.h index 2dfeead9a..600338986 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -116,5 +116,7 @@ gboolean meta_ui_have_a_theme (void); gboolean meta_ui_window_is_widget (MetaUI *ui, Window xwindow); +gboolean meta_ui_window_is_dummy (MetaUI *ui, + Window xwindow); #endif