summaryrefslogtreecommitdiff
path: root/src/core/display.c
diff options
context:
space:
mode:
authorSteve Zesch <[email protected]>2012-05-10 13:08:46 -0700
committerSteve Zesch <[email protected]>2012-05-10 13:08:46 -0700
commitce3d3a4b6e0a93eea4d54ac4bc2907b7432e136b (patch)
tree81f0b3024b3440b881b9e61e165a93d23ca0b22d /src/core/display.c
parent6e5c6ab190ca9bddf0e2b694abd0100ab5fcc11c (diff)
parente2d0da87ec3f7add9643c7f7f424df080d95d8dc (diff)
downloadmarco-ce3d3a4b6e0a93eea4d54ac4bc2907b7432e136b.tar.bz2
marco-ce3d3a4b6e0a93eea4d54ac4bc2907b7432e136b.tar.xz
Merge pull request #3 from benpicco/features
new marco features
Diffstat (limited to 'src/core/display.c')
-rw-r--r--src/core/display.c121
1 files changed, 79 insertions, 42 deletions
diff --git a/src/core/display.c b/src/core/display.c
index 59ec9021..647581f5 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -90,7 +90,9 @@
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
g == META_GRAB_OP_KEYBOARD_TABBING_DOCK || \
g == META_GRAB_OP_KEYBOARD_TABBING_GROUP || \
+ g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL_ALL_WORKSPACES || \
g == META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL || \
+ g == META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL_ALL_WORKSPACES || \
g == META_GRAB_OP_KEYBOARD_ESCAPING_DOCK || \
g == META_GRAB_OP_KEYBOARD_ESCAPING_GROUP)
@@ -1141,9 +1143,11 @@ grab_op_is_keyboard (MetaGrabOp op)
case META_GRAB_OP_KEYBOARD_RESIZING_SW:
case META_GRAB_OP_KEYBOARD_RESIZING_NW:
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
+ case META_GRAB_OP_KEYBOARD_TABBING_NORMAL_ALL_WORKSPACES:
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
+ case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL_ALL_WORKSPACES:
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
@@ -3625,12 +3629,23 @@ meta_display_begin_grab_op (MetaDisplay *display,
META_TAB_LIST_NORMAL,
META_TAB_SHOW_ICON);
break;
+ case META_GRAB_OP_KEYBOARD_TABBING_NORMAL_ALL_WORKSPACES:
+ meta_screen_ensure_tab_popup (screen,
+ META_TAB_LIST_NORMAL_ALL_WORKSPACES,
+ META_TAB_SHOW_ICON);
+ break;
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
meta_screen_ensure_tab_popup (screen,
META_TAB_LIST_NORMAL,
META_TAB_SHOW_INSTANTLY);
break;
+ case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL_ALL_WORKSPACES:
+ meta_screen_ensure_tab_popup (screen,
+ META_TAB_LIST_NORMAL_ALL_WORKSPACES,
+ META_TAB_SHOW_INSTANTLY);
+ break;
+
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
meta_screen_ensure_tab_popup (screen,
META_TAB_LIST_DOCKS,
@@ -4441,7 +4456,9 @@ get_focussed_group (MetaDisplay *display)
return NULL;
}
-#define IN_TAB_CHAIN(w,t) (((t) == META_TAB_LIST_NORMAL && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
+#define IN_TAB_CHAIN(w,t) \
+ (((t) == META_TAB_LIST_NORMAL && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
+ || ((t) == META_TAB_LIST_NORMAL_ALL_WORKSPACES && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
|| ((t) == META_TAB_LIST_DOCKS && META_WINDOW_IN_DOCK_TAB_CHAIN (w)) \
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))))
@@ -4532,56 +4549,76 @@ GList*
meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
- MetaWorkspace *workspace)
+ MetaWorkspace *active_workspace)
{
- GList *tab_list;
+ GList *tab_list, *workspace_list, *l, link;
+ MetaWorkspace *workspace;
- g_return_val_if_fail (workspace != NULL, NULL);
+ g_return_val_if_fail (active_workspace != NULL, NULL);
+
+ if (type == META_TAB_LIST_NORMAL_ALL_WORKSPACES)
+ {
+ workspace_list = screen->workspaces;
+ type = META_TAB_LIST_NORMAL;
+ }
+ else
+ {
+ link.next = NULL;
+ link.prev = NULL;
+ link.data = active_workspace;
+ workspace_list = &link;
+ }
+ tab_list = NULL;
/* Windows sellout mode - MRU order. Collect unminimized windows
* then minimized so minimized windows aren't in the way so much.
*/
- {
- GList *tmp;
-
- tab_list = NULL;
- tmp = workspace->mru_list;
- while (tmp != NULL)
- {
- MetaWindow *window = tmp->data;
-
- if (!window->minimized &&
- window->screen == screen &&
- IN_TAB_CHAIN (window, type))
- tab_list = g_list_prepend (tab_list, window);
-
- tmp = tmp->next;
- }
- }
-
- {
- GList *tmp;
-
- tmp = workspace->mru_list;
- while (tmp != NULL)
- {
- MetaWindow *window = tmp->data;
-
- if (window->minimized &&
- window->screen == screen &&
- IN_TAB_CHAIN (window, type))
- tab_list = g_list_prepend (tab_list, window);
-
- tmp = tmp->next;
- }
- }
-
+ for (l = workspace_list; l != NULL; l = l->next)
+ {
+ GList *tmp;
+
+ workspace = l->data;
+
+ tmp = workspace->mru_list;
+ while (tmp != NULL)
+ {
+ MetaWindow *window = tmp->data;
+
+ if (!window->minimized &&
+ window->screen == screen &&
+ IN_TAB_CHAIN (window, type))
+ tab_list = g_list_prepend (tab_list, window);
+
+ tmp = tmp->next;
+ }
+ }
+
+ for (l = workspace_list; l != NULL; l = l->next)
+ {
+ GList *tmp;
+
+ workspace = l->data;
+
+ tmp = workspace->mru_list;
+ while (tmp != NULL)
+ {
+ MetaWindow *window = tmp->data;
+
+ if (window->minimized &&
+ window->screen == screen &&
+ IN_TAB_CHAIN (window, type))
+ tab_list = g_list_prepend (tab_list, window);
+
+ tmp = tmp->next;
+ }
+ }
+
tab_list = g_list_reverse (tab_list);
-
+
{
GSList *tmp;
MetaWindow *l_window;
-
+
tmp = meta_display_list_windows (display);
/* Go through all windows */
@@ -4591,7 +4628,7 @@ meta_display_get_tab_list (MetaDisplay *display,
/* Check to see if it demands attention */
if (l_window->wm_state_demands_attention &&
- l_window->workspace!=workspace &&
+ l_window->workspace!=active_workspace &&
IN_TAB_CHAIN (l_window, type))
{
/* if it does, add it to the popup */