Commit cdc5bf46 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

prefs: add alt-tab-thumbnails preference

parent 4c5809c3
......@@ -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)
{
......
......@@ -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
......
......@@ -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.
*
......
......@@ -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>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment