summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-29 00:58:50 +0000
committerDana Jansens <danakj@orodu.net>2003-03-29 00:58:50 +0000
commit9d136ab7983ac5bc6f640199032f6b76e8328e82 (patch)
tree3d174824743fe5ecb88bfe015423f1f3e8b70512
parentf154f7b548e1c3ec668d07940905b37a4938bb09 (diff)
add unshaderaise and shadelower actions from Mikachu
-rw-r--r--openbox/action.c24
-rw-r--r--openbox/action.h4
-rw-r--r--plugins/keyboard/keysrc4
-rw-r--r--plugins/mouse/mouserc4
4 files changed, 36 insertions, 0 deletions
diff --git a/openbox/action.c b/openbox/action.c
index ccb988d9..521e3135 100644
--- a/openbox/action.c
+++ b/openbox/action.c
@@ -52,6 +52,10 @@ Action *action_from_string(char *name)
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")) {
@@ -196,6 +200,26 @@ void action_raise(union ActionData *data)
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)
{
if (data->client.c)
diff --git a/openbox/action.h b/openbox/action.h
index 95d9bc2c..fae5b647 100644
--- a/openbox/action.h
+++ b/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);
diff --git a/plugins/keyboard/keysrc b/plugins/keyboard/keysrc
index d31235c6..daa07f53 100644
--- a/plugins/keyboard/keysrc
+++ b/plugins/keyboard/keysrc
@@ -24,6 +24,10 @@
# * 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
diff --git a/plugins/mouse/mouserc b/plugins/mouse/mouserc
index 573d629e..739ac30e 100644
--- a/plugins/mouse/mouserc
+++ b/plugins/mouse/mouserc
@@ -54,6 +54,10 @@
# * 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