]> Dogcows Code - chaz/openbox/commitdiff
add the DesktopLast action, props to marius nita for this one
authorDana Jansens <danakj@orodu.net>
Sun, 31 Aug 2003 20:06:42 +0000 (20:06 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 31 Aug 2003 20:06:42 +0000 (20:06 +0000)
openbox/action.c
openbox/action.h
openbox/screen.c
openbox/screen.h

index c5c0e7ed4313d7808e52d6bda89664a2925ee847..d24e81e6f67af0688c45b8a18b5366ed14bf347c 100644 (file)
@@ -594,6 +594,11 @@ ActionString actionstrings[] =
         action_unshow_desktop,
         NULL
     },
+    {
+        "desktoplast",
+        action_desktop_last,
+        NULL
+    },
     {
         "restart",
         action_restart,
@@ -1052,6 +1057,11 @@ void action_send_to_desktop_dir(union ActionData *data)
         screen_set_desktop(d);
 }
 
+void action_desktop_last(union ActionData *data)
+{
+    screen_set_desktop(screen_last_desktop);
+}
+
 void action_toggle_decorations(union ActionData *data)
 {
     ObClient *c = data->client.any.c;
index 1b8f2156d3a97e55d1280b6fbbb30d34d8a7c8ec..3f6d84eb8b6ac7c7124e4e1323020c7f94c8acef 100644 (file)
@@ -214,6 +214,8 @@ void action_send_to_desktop_dir(union ActionData *data);
 void action_desktop(union ActionData *data);
 /* DesktopDirection */
 void action_desktop_dir(union ActionData *data);
+/* Any */
+void action_desktop_last(union ActionData *data);
 /* ClientAction */
 void action_toggle_decorations(union ActionData *data);
 /* MoveResize */
index 6f711ce8c5b03cbeb536f87221bb8a10cb70604e..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 */
index bd47496d3f767456c8565086c56dcc1306000a92..1484207a2c9a16c12f625ac3652c8947d8e04a9d 100644 (file)
@@ -14,6 +14,8 @@ extern guint screen_num_desktops;
 extern guint screen_num_monitors;
 /*! The current desktop */
 extern guint screen_desktop;
+/*! The desktop which was last visible */
+extern guint screen_last_desktop;
 /*! Are we in showing-desktop mode? */
 extern gboolean screen_showing_desktop;
 /*! The support window also used for focus and stacking */
This page took 0.034938 seconds and 4 git commands to generate.