add unshaderaise and shadelower actions from Mikachu
Dana Jansens danakj@orodu.net
4 files changed,
36 insertions(+),
0 deletions(-)
M
openbox/action.c
→
openbox/action.c
@@ -52,6 +52,10 @@ } else if (!g_ascii_strcasecmp(name, "close")) {
a = action_new(action_close); } else if (!g_ascii_strcasecmp(name, "kill")) { a = action_new(action_kill); + } else if (!g_ascii_strcasecmp(name, "shadelower")) { + a = action_new(action_shadelower); + } else if (!g_ascii_strcasecmp(name, "unshaderaise")) { + a = action_new(action_unshaderaise); } else if (!g_ascii_strcasecmp(name, "shade")) { a = action_new(action_shade); } else if (!g_ascii_strcasecmp(name, "unshade")) {@@ -194,6 +198,26 @@ void action_raise(union ActionData *data)
{ if (data->client.c) stacking_raise(data->client.c); +} + +void action_unshaderaise(union ActionData *data) +{ + if (data->client.c) { + if (data->client.c->shaded) + client_shade(data->client.c, FALSE); + else + stacking_raise(data->client.c); + } +} + +void action_shadelower(union ActionData *data) +{ + if (data->client.c) { + if (data->client.c->shaded) + stacking_lower(data->client.c); + else + client_shade(data->client.c, TRUE); + } } void action_lower(union ActionData *data)
M
openbox/action.h
→
openbox/action.h
@@ -120,6 +120,10 @@ void action_kill(union ActionData *data);
/* ClientAction */ void action_shade(union ActionData *data); /* ClientAction */ +void action_shadelower(union ActionData *data); +/* ClientAction */ +void action_unshaderaise(union ActionData *data); +/* ClientAction */ void action_unshade(union ActionData *data); /* ClientAction */ void action_toggle_shade(union ActionData *data);
M
plugins/keyboard/keysrc
→
plugins/keyboard/keysrc
@@ -24,6 +24,10 @@ # * Kill - Kill the focused client forcefully
# * Shade - Shade (roll up) the focused client # * Unshade - Unshade (roll down) the focused client # * ToggleShade - Shade and unshade the focused client +# * ShadeLower - Shades the window if it's not shaded, and lower it +# if it was already shaded +# * UnshadeRaise - Unshades the window if it's shaded, and raise it +# if it was already unshaded # * ToggleOmnipresent - Place the focused client on all desktops or the # current one # * MaximizeFull - Maximize the focused window horizontally and vertically
M
plugins/mouse/mouserc
→
plugins/mouse/mouserc
@@ -54,6 +54,10 @@ # * Kill - Kill the client forcefully
# * Shade - Shade (roll up) the client # * Unshade - Unshade (roll down) the client # * ToggleShade - Shade and unshade the client +# * ShadeLower - Shades the window if it's not shaded, and lower it +# if it was already shaded +# * UnshadeRaise - Unshades the window if it's shaded, and raise it +# if it was already unshaded # * ToggleOmnipresent - Place the client on all desktops or the current one # * MaximizeFull - Maximize the window horizontally and vertically # * UnmaximizeFull - Restore the window horizontally and vertically