mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
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:
parent
368346571a
commit
cfa45beee1
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user