all repos — openbox @ 854da68d0f5bed8c85c101fd6895244d60183ff5

openbox fork - make it a bit more like ryudo

add the DesktopLast action, props to marius nita for this one
Dana Jansens danakj@orodu.net
commit

854da68d0f5bed8c85c101fd6895244d60183ff5

parent

030fabad14e994d575feba9894a0412e5266f0bb

4 files changed, 17 insertions(+), 0 deletions(-)

jump to
M openbox/action.copenbox/action.c

@@ -595,6 +595,11 @@ action_unshow_desktop,

NULL }, { + "desktoplast", + action_desktop_last, + NULL + }, + { "restart", action_restart, NULL

@@ -1050,6 +1055,11 @@ data->sendtodir.inter.cancel);

client_set_desktop(c, d, data->sendtodir.follow); if (data->sendtodir.follow) screen_set_desktop(d); +} + +void action_desktop_last(union ActionData *data) +{ + screen_set_desktop(screen_last_desktop); } void action_toggle_decorations(union ActionData *data)
M openbox/action.hopenbox/action.h

@@ -214,6 +214,8 @@ /* Desktop */

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 */
M openbox/screen.copenbox/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;

@@ -419,6 +420,8 @@ PROP_SET32(RootWindow(ob_display, ob_screen),

net_current_desktop, cardinal, num); if (old == num) return; + + screen_last_desktop = old; ob_debug("Moving to desktop %d\n", num+1);
M openbox/screen.hopenbox/screen.h

@@ -14,6 +14,8 @@ /*! The number of virtual "xinerama" screens/heads */

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 */