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:
Havoc Pennington 2002-05-17 01:48:57 +00:00 committed by Havoc Pennington
parent bb35f88925
commit 82b064ed7d
2 changed files with 10 additions and 4 deletions

View File

@ -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>
* src/window.c (constrain_position): lock desktop to position 0,0

View File

@ -521,8 +521,6 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
i = meta_workspace_index (workspace);
num_workspaces = meta_screen_get_n_workspaces (workspace->screen);
/* FIXME this code is entirely broken */
/*
* 3 rows, 4 columns, horizontal layout:
@ -568,6 +566,10 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
rows, cols, workspace->screen->vertical_workspaces,
i, num_workspaces, direction);
/* FIXME someone who's better or more patient at math puzzles
* should clean this up. ;-)
*/
if (workspace->screen->vertical_workspaces)
{
switch (direction)
@ -584,7 +586,7 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
break;
case META_MOTION_RIGHT:
if ((i + rows) >= num_workspaces)
i = i + rows - num_workspaces;
i = (i % rows + 1) % rows;
else
i += rows;
break;
@ -626,7 +628,7 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace,
break;
case META_MOTION_DOWN:
if ((i + cols) >= num_workspaces)
i = i + cols - num_workspaces;
i = (i % cols + 1) % cols;
else
i += cols;
break;