diff --git a/src/compositor/mutter/compositor-mutter.c b/src/compositor/mutter/compositor-mutter.c index ed8fcb459..c79459e3d 100644 --- a/src/compositor/mutter/compositor-mutter.c +++ b/src/compositor/mutter/compositor-mutter.c @@ -783,24 +783,20 @@ mutter_window_get_workspace (MutterWindow *mcw) return meta_workspace_index (workspace); } -gboolean -mutter_window_is_hidden (MutterWindow *mcw) -{ - MutterWindowPrivate *priv; +mutter_window_showing_on_its_workspace (MutterWindow *mcw) +{ if (!mcw) + return FALSE; + + /* If override redirect: */ + if (!mcw->priv->window) return TRUE; - priv = mcw->priv; - - if (!priv->window) - return FALSE; - - return meta_window_is_hidden (priv->window); + return meta_window_showing_on_its_workspace (mcw->priv->window); } - -static void repair_win (MutterWindow *cw); +tatic void repair_win (MutterWindow *cw); static void map_win (MutterWindow *cw); static void unmap_win (MutterWindow *cw); diff --git a/src/include/compositor-mutter.h b/src/include/compositor-mutter.h index d312de7ab..85645ae53 100644 --- a/src/include/compositor-mutter.h +++ b/src/include/compositor-mutter.h @@ -65,6 +65,7 @@ MetaWindow * mutter_window_get_meta_window (MutterWindow *mcw); ClutterActor * mutter_window_get_texture (MutterWindow *mcw); gboolean mutter_window_is_override_redirect (MutterWindow *mcw); const char * mutter_window_get_description (MutterWindow *mcw); +gboolean mutter_window_showing_on_its_workspace (MutterWindow *mcw); /* Compositor API */ MetaCompositor *mutter_new (MetaDisplay *display); diff --git a/src/include/window.h b/src/include/window.h index e87439086..fc989dc9a 100644 --- a/src/include/window.h +++ b/src/include/window.h @@ -64,5 +64,8 @@ void meta_window_activate_with_workspace (MetaWindow *window, guint32 current_time, MetaWorkspace *workspace); const char * meta_window_get_description (MetaWindow *window); +/* Return whether the window would be showing if we were on its workspace */ +gboolean meta_window_showing_on_its_workspace (MetaWindow *window); + #endif