Live previews for hidden windows.

ClutterActors for hidden windows (such windows on different than active
workspaces and windows that are minimized) are available, and reflect the
actual state of the window. This is intended for use in task-switchers etc.

This feature is disabled by default (due to increased demand on resources),
and can be enabled through the metacity/general/live_hidden_windows gconf key.

A trivial sample window switcher is included in the scratch plugin (activated
by clicking on the slide out panel).
This commit is contained in:
Tomas Frydrych
2008-10-24 10:07:24 +01:00
parent 273d213509
commit 07c1003905
22 changed files with 2017 additions and 221 deletions

View File

@ -57,10 +57,13 @@ struct _MutterWindow
GType mutter_window_get_type (void);
Window mutter_window_get_x_window (MutterWindow *mcw);
MetaCompWindowType mutter_window_get_window_type (MutterWindow *mcw);
gint mutter_window_get_workspace (MutterWindow *mcw);
Window mutter_window_get_x_window (MutterWindow *mcw);
MetaCompWindowType mutter_window_get_window_type (MutterWindow *mcw);
gint mutter_window_get_workspace (MutterWindow *mcw);
gboolean mutter_window_is_hidden (MutterWindow *mcw);
MetaWindow * mutter_window_get_meta_window (MutterWindow *mcw);
ClutterActor * mutter_window_get_texture (MutterWindow *mcw);
gboolean mutter_window_is_override_redirect (MutterWindow *mcw);
/* Compositor API */
MetaCompositor *mutter_new (MetaDisplay *display);
@ -70,5 +73,6 @@ void mutter_window_effect_completed (MutterWindow *actor, gulong event);
ClutterActor * mutter_get_stage_for_screen (MetaScreen *screen);
ClutterActor * mutter_get_overlay_group_for_screen (MetaScreen *screen);
Window mutter_get_overlay_window (MetaScreen *screen);
GList * mutter_get_windows (MetaScreen *screen);
#endif

View File

@ -127,6 +127,11 @@ meta_compositor_switch_workspace (MetaCompositor *compositor,
MetaWorkspace *from,
MetaWorkspace *to,
MetaMotionDirection direction);
void
meta_compositor_ensure_stack_order (MetaCompositor *compositor,
MetaScreen *screen);
#endif

View File

@ -225,4 +225,7 @@ void
mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
gint x, gint y, gint width, gint height);
GList *
mutter_plugin_get_windows (MutterPlugin *plugin);
#endif /* MUTTER_PLUGIN_H_ */

View File

@ -62,8 +62,9 @@ typedef enum
META_PREF_COMPOSITING_MANAGER,
#ifdef WITH_CLUTTER
META_PREF_CLUTTER_DISABLED,
META_PREF_CLUTTER_PLUGINS
META_PREF_CLUTTER_PLUGINS,
#endif
META_PREF_LIVE_HIDDEN_WINDOWS,
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@ -139,6 +140,10 @@ GSList * meta_prefs_get_clutter_plugins (void);
void meta_prefs_set_clutter_plugins (GSList *list);
#endif
gboolean meta_prefs_get_live_hidden_windows (void);
void meta_prefs_set_live_hidden_windows (gboolean whether);
/* XXX FIXME This should be x-macroed, but isn't yet because it would be
* difficult (or perhaps impossible) to add the suffixes using the current
* system. It needs some more thought, perhaps after the current system

View File

@ -58,4 +58,10 @@ MetaWindowType meta_window_get_type (MetaWindow *window);
Atom meta_window_get_type_atom (MetaWindow *window);
MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
gboolean meta_window_is_on_all_workspaces (MetaWindow *window);
gboolean meta_window_is_hidden (MetaWindow *window);
void meta_window_activate (MetaWindow *window,guint32 current_time);
void meta_window_activate_with_workspace (MetaWindow *window,
guint32 current_time,
MetaWorkspace *workspace);
#endif

View File

@ -57,4 +57,8 @@ int meta_workspace_index (MetaWorkspace *workspace);
MetaScreen *meta_workspace_get_screen (MetaWorkspace *workspace);
void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace,
MetaRectangle *area);
void meta_workspace_activate (MetaWorkspace *workspace, guint32 timestamp);
void meta_workspace_activate_with_focus (MetaWorkspace *workspace,
MetaWindow *focus_this,
guint32 timestamp);
#endif