summaryrefslogtreecommitdiff
path: root/src/core/workspace.c
diff options
context:
space:
mode:
authorRobert David <[email protected]>2015-01-22 22:40:44 +0100
committerRobert David <[email protected]>2015-01-23 15:20:22 +0100
commitda35f0b35b46682d3566cb0ffc7ec2136317a1c9 (patch)
tree0d86a101945a3ad883ee21bf98c22f5847f03089 /src/core/workspace.c
parent05ac791462644b0d9dd909e995be996fdfa139cc (diff)
downloadmarco-da35f0b35b46682d3566cb0ffc7ec2136317a1c9.tar.bz2
marco-da35f0b35b46682d3566cb0ffc7ec2136317a1c9.tar.xz
Possible keybinding to switch to previous workspace.
Disabled at default.
Diffstat (limited to 'src/core/workspace.c')
-rw-r--r--src/core/workspace.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/workspace.c b/src/core/workspace.c
index b85ab53c..d61529d2 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -385,6 +385,9 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
/* Note that old can be NULL; e.g. when starting up */
old = workspace->screen->active_workspace;
+ /* Save old workspace, to be able to switch back. */
+ workspace->screen->prev_workspace = old;
+
workspace->screen->active_workspace = workspace;
set_active_space_hint (workspace->screen);
@@ -798,6 +801,8 @@ meta_motion_direction_to_string (MetaMotionDirection direction)
return "Left";
case META_MOTION_RIGHT:
return "Right";
+ case META_MOTION_PREV:
+ return "Previous";
}
return "Unknown";
@@ -838,6 +843,8 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
case META_MOTION_DOWN:
layout.current_row += 1;
break;
+ case META_MOTION_PREV:
+ break;
}
/* LEFT */
@@ -914,6 +921,8 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
if (wrap == META_WRAP_TOROIDAL)
layout.current_col = layout.current_col < layout.cols - 1 ? layout.current_col + 1 : 0;
break;
+ case META_MOTION_PREV:
+ break;
}
i = layout.grid[layout.current_row * layout.cols + layout.current_col];