add the DesktopLast action, props to marius nita for this one
Dana Jansens danakj@orodu.net
4 files changed,
17 insertions(+),
0 deletions(-)
M
openbox/action.c
→
openbox/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.h
→
openbox/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.c
→
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;@@ -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.h
→
openbox/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 */