mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
fix it, maybe
2002-05-16 Havoc Pennington <hp@pobox.com> * src/workspace.c (meta_workspace_get_neighbor): fix it, maybe
This commit is contained in:
parent
bb35f88925
commit
82b064ed7d
@ -1,3 +1,7 @@
|
|||||||
|
2002-05-16 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/workspace.c (meta_workspace_get_neighbor): fix it, maybe
|
||||||
|
|
||||||
2002-05-16 Havoc Pennington <hp@redhat.com>
|
2002-05-16 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* src/window.c (constrain_position): lock desktop to position 0,0
|
* src/window.c (constrain_position): lock desktop to position 0,0
|
||||||
|
@ -522,8 +522,6 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
|
|||||||
i = meta_workspace_index (workspace);
|
i = meta_workspace_index (workspace);
|
||||||
num_workspaces = meta_screen_get_n_workspaces (workspace->screen);
|
num_workspaces = meta_screen_get_n_workspaces (workspace->screen);
|
||||||
|
|
||||||
/* FIXME this code is entirely broken */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 3 rows, 4 columns, horizontal layout:
|
* 3 rows, 4 columns, horizontal layout:
|
||||||
* +--+--+--+--+
|
* +--+--+--+--+
|
||||||
@ -568,6 +566,10 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
|
|||||||
rows, cols, workspace->screen->vertical_workspaces,
|
rows, cols, workspace->screen->vertical_workspaces,
|
||||||
i, num_workspaces, direction);
|
i, num_workspaces, direction);
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME someone who's better or more patient at math puzzles
|
||||||
|
* should clean this up. ;-)
|
||||||
|
*/
|
||||||
if (workspace->screen->vertical_workspaces)
|
if (workspace->screen->vertical_workspaces)
|
||||||
{
|
{
|
||||||
switch (direction)
|
switch (direction)
|
||||||
@ -584,7 +586,7 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
|
|||||||
break;
|
break;
|
||||||
case META_MOTION_RIGHT:
|
case META_MOTION_RIGHT:
|
||||||
if ((i + rows) >= num_workspaces)
|
if ((i + rows) >= num_workspaces)
|
||||||
i = i + rows - num_workspaces;
|
i = (i % rows + 1) % rows;
|
||||||
else
|
else
|
||||||
i += rows;
|
i += rows;
|
||||||
break;
|
break;
|
||||||
@ -626,7 +628,7 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
|
|||||||
break;
|
break;
|
||||||
case META_MOTION_DOWN:
|
case META_MOTION_DOWN:
|
||||||
if ((i + cols) >= num_workspaces)
|
if ((i + cols) >= num_workspaces)
|
||||||
i = i + cols - num_workspaces;
|
i = (i % cols + 1) % cols;
|
||||||
else
|
else
|
||||||
i += cols;
|
i += cols;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user