summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/prefs.c50
-rw-r--r--src/core/screen.c5
2 files changed, 53 insertions, 2 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 8dd1008a..61c957ad 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -121,6 +121,7 @@ static gboolean show_tab_border = FALSE;
static gboolean center_new_windows = FALSE;
static gboolean force_fullscreen = TRUE;
static gboolean side_by_side_tiling = FALSE;
+static GList *show_desktop_skip_list = NULL;
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH;
static MetaButtonLayout button_layout;
@@ -159,6 +160,7 @@ static void titlebar_handler (MetaPreference, const gchar*, gboolean*);
static void theme_name_handler (MetaPreference, const gchar*, gboolean*);
static void mouse_button_mods_handler (MetaPreference, const gchar*, gboolean*);
static void button_layout_handler (MetaPreference, const gchar*, gboolean*);
+static void show_desktop_skip_list_handler (MetaPreference, const gchar*, gboolean*);
static gboolean update_binding (MetaKeyPref *binding,
gchar *value);
@@ -467,6 +469,12 @@ static MetaStringPreference preferences_string[] =
NULL,
&cursor_theme,
},
+ { "show-desktop-skip-list",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_SHOW_DESKTOP_SKIP_LIST,
+ &show_desktop_skip_list_handler,
+ NULL,
+ },
{ NULL, NULL, 0, NULL, NULL },
};
@@ -1085,6 +1093,18 @@ meta_prefs_get_cursor_size (void)
return cursor_size;
}
+gboolean
+meta_prefs_is_in_skip_list (char *class)
+{
+ GList *item;
+
+ for (item = show_desktop_skip_list; item; item = item->next)
+ {
+ if (!g_ascii_strcasecmp (class, item->data))
+ return TRUE;
+ }
+ return FALSE;
+}
/****************************************************************************/
/* Handlers for string preferences. */
@@ -1172,6 +1192,33 @@ mouse_button_mods_handler (MetaPreference pref,
}
}
+static void
+show_desktop_skip_list_handler (MetaPreference pref,
+ const gchar *string_value,
+ gboolean *inform_listeners)
+{
+ gchar **tokens;
+ gchar **tok;
+ GList *item;
+
+ if (show_desktop_skip_list)
+ {
+ for (item = show_desktop_skip_list; item; item = item->next)
+ g_free (item->data);
+ g_list_free (show_desktop_skip_list);
+ show_desktop_skip_list = NULL;
+ }
+
+ if (!(tokens = g_strsplit (string_value, ",", -1)))
+ return;
+ for (tok = tokens; tok && *tok; tok++)
+ {
+ gchar *stripped = g_strstrip (g_strdup (*tok));
+ show_desktop_skip_list = g_list_prepend (show_desktop_skip_list, stripped);
+ }
+ g_strfreev (tokens);
+}
+
static gboolean
button_layout_equal (const MetaButtonLayout *a,
const MetaButtonLayout *b)
@@ -1576,6 +1623,9 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_PLACEMENT_MODE:
return "PLACEMENT_MODE";
+
+ case META_PREF_SHOW_DESKTOP_SKIP_LIST:
+ return "SHOW_DESKTOP_SKIP_LIST";
}
return "(unknown)";
diff --git a/src/core/screen.c b/src/core/screen.c
index 34016d51..98ecf4db 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -2447,7 +2447,7 @@ queue_windows_showing (MetaScreen *screen)
{
MetaWindow *w = tmp->data;
- if (w->screen == screen)
+ if (w->screen == screen && !meta_prefs_is_in_skip_list (w->res_class))
meta_window_queue (w, META_QUEUE_CALC_SHOWING);
tmp = tmp->next;
@@ -2501,7 +2501,8 @@ meta_screen_show_desktop (MetaScreen *screen,
MetaWindow *w = windows->data;
if (w->screen == screen &&
- w->type == META_WINDOW_DESKTOP)
+ w->type == META_WINDOW_DESKTOP &&
+ !meta_prefs_is_in_skip_list (w->res_class))
{
meta_window_focus (w, timestamp);
break;