exposes meta_window_showing_on_its_workspace via mutter_window_showing_on_its_workspace

This e.g. allows a switcher plugin to determine if a mutter window corresponds
to a minimized or visible window
This commit is contained in:
Robert Bragg 2008-11-03 14:45:28 +00:00
parent 368346571a
commit cfa45beee1
3 changed files with 12 additions and 12 deletions

View File

@ -783,24 +783,20 @@ mutter_window_get_workspace (MutterWindow *mcw)
return meta_workspace_index (workspace); return meta_workspace_index (workspace);
} }
gboolean
mutter_window_is_hidden (MutterWindow *mcw) mutter_window_showing_on_its_workspace (MutterWindow *mcw)
{ {
MutterWindowPrivate *priv;
if (!mcw) if (!mcw)
return TRUE;
priv = mcw->priv;
if (!priv->window)
return FALSE; return FALSE;
return meta_window_is_hidden (priv->window); /* If override redirect: */
if (!mcw->priv->window)
return TRUE;
return meta_window_showing_on_its_workspace (mcw->priv->window);
} }
tatic void repair_win (MutterWindow *cw);
static void repair_win (MutterWindow *cw);
static void map_win (MutterWindow *cw); static void map_win (MutterWindow *cw);
static void unmap_win (MutterWindow *cw); static void unmap_win (MutterWindow *cw);

View File

@ -65,6 +65,7 @@ MetaWindow * mutter_window_get_meta_window (MutterWindow *mcw);
ClutterActor * mutter_window_get_texture (MutterWindow *mcw); ClutterActor * mutter_window_get_texture (MutterWindow *mcw);
gboolean mutter_window_is_override_redirect (MutterWindow *mcw); gboolean mutter_window_is_override_redirect (MutterWindow *mcw);
const char * mutter_window_get_description (MutterWindow *mcw); const char * mutter_window_get_description (MutterWindow *mcw);
gboolean mutter_window_showing_on_its_workspace (MutterWindow *mcw);
/* Compositor API */ /* Compositor API */
MetaCompositor *mutter_new (MetaDisplay *display); MetaCompositor *mutter_new (MetaDisplay *display);

View File

@ -64,5 +64,8 @@ void meta_window_activate_with_workspace (MetaWindow *window,
guint32 current_time, guint32 current_time,
MetaWorkspace *workspace); MetaWorkspace *workspace);
const char * meta_window_get_description (MetaWindow *window); 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 #endif