]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
add the DesktopLast action, props to marius nita for this one
[chaz/openbox] / openbox / screen.c
index 7913770c2b133abcfa7a56cb24b7be5b888035f0..3809e05aacac25e128b33020674dc4096051684a 100644 (file)
@@ -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;
     }
This page took 0.024892 seconds and 4 git commands to generate.