mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
- Wrap-around workspaces (ie. when on the last workspace, "switch_to_workspace_right" goes back to the first one)
This commit is contained in:
parent
011a7f77a6
commit
cf4ef8cab2
@ -1,3 +1,10 @@
|
||||
2002-05-05 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* src/workspace.c: (meta_workspace_get_neighbor):
|
||||
Wrap-around workspaces (ie. when on the last workspace,
|
||||
"switch_to_workspace_right" goes back to the
|
||||
first one)
|
||||
|
||||
2002-05-05 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* src/metacity.schemas: Fix a spelling error and change
|
||||
|
@ -487,17 +487,24 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
|
||||
/* FIXME this isn't using any sane layout, just assuming
|
||||
* the spaces are in a big row
|
||||
*/
|
||||
int i;
|
||||
int i, num_workspaces;
|
||||
|
||||
i = meta_workspace_index (workspace);
|
||||
|
||||
/* Wrap from the last workspace to the first one, and vice-versa */
|
||||
num_workspaces = g_list_length (workspace->screen->display->workspaces);
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case META_MOTION_LEFT:
|
||||
--i;
|
||||
if (i == -1)
|
||||
i = num_workspaces - 1;
|
||||
break;
|
||||
case META_MOTION_RIGHT:
|
||||
++i;
|
||||
if (i == num_workspaces)
|
||||
i = 0;
|
||||
break;
|
||||
case META_MOTION_UP:
|
||||
case META_MOTION_DOWN:
|
||||
|
Loading…
Reference in New Issue
Block a user