X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=3809e05aacac25e128b33020674dc4096051684a;hb=b543af60b3b625f978bec0eacc7da31cd9d347f6;hp=7913770c2b133abcfa7a56cb24b7be5b888035f0;hpb=de4f92ccc66c1dad1a2820a07d1f0161bd61a855;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 7913770c..3809e05a 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -36,6 +36,7 @@ guint screen_num_desktops; guint screen_num_monitors; guint screen_desktop; +guint screen_last_desktop; Size screen_physical_size; gboolean screen_showing_desktop; DesktopLayout screen_desktop_layout; @@ -420,6 +421,8 @@ void screen_set_desktop(guint num) if (old == num) return; + screen_last_desktop = old; + ob_debug("Moving to desktop %d\n", num+1); /* show windows before hiding the rest to lessen the enter/leave events */ @@ -584,7 +587,7 @@ static void popup_cycle(guint d, gboolean show) } guint screen_cycle_desktop(ObDirection dir, gboolean wrap, gboolean linear, - gboolean done, gboolean cancel) + gboolean dialog, gboolean done, gboolean cancel) { static gboolean first = TRUE; static gboolean lin; @@ -594,8 +597,7 @@ guint screen_cycle_desktop(ObDirection dir, gboolean wrap, gboolean linear, if (cancel) { d = origd; goto done_cycle; - } else if (done) { - screen_set_desktop(d); + } else if (done && dialog) { goto done_cycle; } if (first) { @@ -682,7 +684,7 @@ guint screen_cycle_desktop(ObDirection dir, gboolean wrap, gboolean linear, d = translate_row_col(r, c); } - if (config_desktop_popup) { + if (dialog) { popup_cycle(d, TRUE); return d; }