From 036747fba5facefff841a98f7414bbd3a4a1b4ab Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 6 Jan 2003 02:59:19 +0000 Subject: [PATCH] invert vertical_workspaces cases (we want to go down each column if it's 2003-01-05 Havoc Pennington * src/screen.c (meta_screen_calc_workspace_layout): invert vertical_workspaces cases (we want to go down each column if it's vertical, and across each row if horizontal). Patch from readams@hmc.edu --- ChangeLog | 9 ++++- src/screen.c | 96 ++++++++++++++++++++++++++-------------------------- 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 370f805eb..cad12db57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,16 @@ +2003-01-05 Havoc Pennington + + * src/screen.c (meta_screen_calc_workspace_layout): invert + vertical_workspaces cases (we want to go down each column if + it's vertical, and across each row if horizontal). Patch + from readams@hmc.edu + 2003-01-05 Pablo Saratxaga * configure.in: Added Macedonian (mk) to ALL_LINGUAS 2003-01-05 Havoc Pennington - + * src/frames.c (meta_frames_apply_shapes): put in the HAVE_GTK_MULTIHEAD conditionals so we build with GTK 2.0 diff --git a/src/screen.c b/src/screen.c index 1912d898d..b0f210998 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1684,21 +1684,6 @@ meta_screen_calc_workspace_layout (MetaScreen *screen, { case META_SCREEN_TOPLEFT: if (screen->vertical_workspaces) - { - r = 0; - while (r < rows) - { - c = 0; - while (c < cols) - { - grid[r*cols+c] = i; - ++i; - ++c; - } - ++r; - } - } - else { c = 0; while (c < cols) @@ -1713,24 +1698,24 @@ meta_screen_calc_workspace_layout (MetaScreen *screen, ++c; } } + else + { + r = 0; + while (r < rows) + { + c = 0; + while (c < cols) + { + grid[r*cols+c] = i; + ++i; + ++c; + } + ++r; + } + } break; case META_SCREEN_TOPRIGHT: if (screen->vertical_workspaces) - { - r = 0; - while (r < rows) - { - c = cols - 1; - while (c >= 0) - { - grid[r*cols+c] = i; - ++i; - --c; - } - ++r; - } - } - else { c = cols - 1; while (c >= 0) @@ -1745,24 +1730,24 @@ meta_screen_calc_workspace_layout (MetaScreen *screen, --c; } } - break; - case META_SCREEN_BOTTOMLEFT: - if (screen->vertical_workspaces) + else { - r = rows - 1; - while (r >= 0) + r = 0; + while (r < rows) { - c = 0; - while (c < cols) + c = cols - 1; + while (c >= 0) { grid[r*cols+c] = i; ++i; - ++c; + --c; } - --r; + ++r; } } - else + break; + case META_SCREEN_BOTTOMLEFT: + if (screen->vertical_workspaces) { c = 0; while (c < cols) @@ -1777,24 +1762,24 @@ meta_screen_calc_workspace_layout (MetaScreen *screen, ++c; } } - break; - case META_SCREEN_BOTTOMRIGHT: - if (screen->vertical_workspaces) + else { r = rows - 1; while (r >= 0) { - c = cols - 1; - while (c >= 0) + c = 0; + while (c < cols) { grid[r*cols+c] = i; ++i; - --c; + ++c; } --r; } } - else + break; + case META_SCREEN_BOTTOMRIGHT: + if (screen->vertical_workspaces) { c = cols - 1; while (c >= 0) @@ -1809,6 +1794,21 @@ meta_screen_calc_workspace_layout (MetaScreen *screen, --c; } } + else + { + r = rows - 1; + while (r >= 0) + { + c = cols - 1; + while (c >= 0) + { + grid[r*cols+c] = i; + ++i; + --c; + } + --r; + } + } break; } @@ -1852,7 +1852,7 @@ meta_screen_calc_workspace_layout (MetaScreen *screen, r = 0; while (r < layout->rows) { - meta_verbose (""); + meta_verbose (" "); meta_push_no_msg_prefix (); c = 0; while (c < layout->cols)