From: Dana Jansens Date: Thu, 17 Apr 2003 07:33:50 +0000 (+0000) Subject: 02:33 (@xor) omg yes X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=1923939bba3c1b2590d14adf01b667eee40fa8cf;p=chaz%2Fopenbox 02:33 (@xor) omg yes 02:33 (@xor) grid workspace cycling of d3th --- diff --git a/openbox/action.c b/openbox/action.c index ea6202e6..41e174d9 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -578,13 +578,13 @@ void action_next_desktop_column(union ActionData *data) cur_row_col(&r, &c); ++c; + if (c >= screen_desktop_layout.columns) + c = 0; d = translate_row_col(r, c); if (d >= screen_num_desktops) { if (!data->nextprevdesktop.wrap) return; - c = 0; - } - if (d >= screen_num_desktops) ++c; + } d = translate_row_col(r, c); if (d < screen_num_desktops) screen_set_desktop(d); @@ -596,13 +596,13 @@ void action_previous_desktop_column(union ActionData *data) cur_row_col(&r, &c); --c; + if (c >= screen_desktop_layout.columns) + c = screen_desktop_layout.columns - 1; d = translate_row_col(r, c); if (d >= screen_num_desktops) { if (!data->nextprevdesktop.wrap) return; - c = screen_desktop_layout.columns - 1; - } - if (d >= screen_num_desktops) --c; + } d = translate_row_col(r, c); if (d < screen_num_desktops) screen_set_desktop(d); @@ -614,13 +614,13 @@ void action_next_desktop_row(union ActionData *data) cur_row_col(&r, &c); ++r; + if (r >= screen_desktop_layout.rows) + r = 0; d = translate_row_col(r, c); if (d >= screen_num_desktops) { if (!data->nextprevdesktop.wrap) return; - r = 0; - } - if (d >= screen_num_desktops) ++r; + } d = translate_row_col(r, c); if (d < screen_num_desktops) screen_set_desktop(d); @@ -632,13 +632,13 @@ void action_previous_desktop_row(union ActionData *data) cur_row_col(&r, &c); --r; + if (r >= screen_desktop_layout.rows) + r = screen_desktop_layout.rows - 1; d = translate_row_col(r, c); if (d >= screen_num_desktops) { if (!data->nextprevdesktop.wrap) return; - c = screen_desktop_layout.rows - 1; - } - if (d >= screen_num_desktops) --r; + } d = translate_row_col(r, c); if (d < screen_num_desktops) screen_set_desktop(d);