diff options
-rw-r--r-- | src/core/prefs.c | 18 | ||||
-rw-r--r-- | src/core/screen.c | 5 | ||||
-rw-r--r-- | src/include/prefs.h | 5 | ||||
-rw-r--r-- | src/org.gnome.metacity.gschema.xml.in | 8 |
4 files changed, 34 insertions, 2 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c index 1e197abe..49fa86cc 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -90,6 +90,7 @@ static gboolean compositing_manager = FALSE; static gboolean resize_with_right_button = FALSE; static gboolean edge_tiling = FALSE; static gboolean force_fullscreen = TRUE; +static gboolean alt_tab_thumbnails = FALSE; static GDesktopVisualBellType visual_bell_type = G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH; static MetaButtonLayout button_layout; @@ -354,6 +355,14 @@ static MetaBoolPreference preferences_bool[] = &edge_tiling, FALSE, }, + { + { "alt-tab-thumbnails", + SCHEMA_METACITY, + META_PREF_ALT_TAB_THUMBNAILS, + }, + &alt_tab_thumbnails, + FALSE, + }, { { NULL, 0, 0 }, NULL, FALSE }, }; @@ -1422,6 +1431,9 @@ meta_preference_to_string (MetaPreference pref) case META_PREF_PLACEMENT_MODE: return "PLACEMENT_MODE"; + + case META_PREF_ALT_TAB_THUMBNAILS: + return "ALT_TAB_THUMBNAILS"; } return "(unknown)"; @@ -1844,6 +1856,12 @@ meta_prefs_get_placement_mode (void) return placement_mode; } +gboolean +meta_prefs_get_alt_tab_thumbnails (void) +{ + return alt_tab_thumbnails; +} + void meta_prefs_set_compositing_manager (gboolean whether) { diff --git a/src/core/screen.c b/src/core/screen.c index 8384dd0d..a3db88c7 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -1294,7 +1294,10 @@ meta_screen_ensure_tab_popup (MetaScreen *screen, entries[i].key = (MetaTabEntryKey) window->xwindow; entries[i].title = window->title; - win_pixbuf = get_window_pixbuf (window, &width, &height); + win_pixbuf = NULL; + if (meta_prefs_get_alt_tab_thumbnails ()) + win_pixbuf = get_window_pixbuf (window, &width, &height); + if (win_pixbuf == NULL) entries[i].icon = g_object_ref (window->icon); else diff --git a/src/include/prefs.h b/src/include/prefs.h index ba57be0a..b03557e5 100644 --- a/src/include/prefs.h +++ b/src/include/prefs.h @@ -60,7 +60,8 @@ typedef enum META_PREF_RESIZE_WITH_RIGHT_BUTTON, META_PREF_EDGE_TILING, META_PREF_FORCE_FULLSCREEN, - META_PREF_PLACEMENT_MODE + META_PREF_PLACEMENT_MODE, + META_PREF_ALT_TAB_THUMBNAILS } MetaPreference; typedef enum @@ -128,6 +129,8 @@ gboolean meta_prefs_get_force_fullscreen (void); MetaPlacementMode meta_prefs_get_placement_mode (void); +gboolean meta_prefs_get_alt_tab_thumbnails (void); + /** * Sets whether the compositor is turned on. * diff --git a/src/org.gnome.metacity.gschema.xml.in b/src/org.gnome.metacity.gschema.xml.in index 430af804..8f0fc6c0 100644 --- a/src/org.gnome.metacity.gschema.xml.in +++ b/src/org.gnome.metacity.gschema.xml.in @@ -54,6 +54,14 @@ their workspaces. </_description> </key> + <key name="alt-tab-thumbnails" type="b"> + <default>false</default> + <_summary>Show window content thumbnail in alt-tab</_summary> + <_description> + If set to true Metacity will show window content thumbnails in alt-tab + window instead of only icons. + </_description> + </key> </schema> </schemalist> |