]> Dogcows Code - chaz/openbox/commitdiff
add unshaderaise and shadelower actions from Mikachu
authorDana Jansens <danakj@orodu.net>
Sat, 29 Mar 2003 00:58:50 +0000 (00:58 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 29 Mar 2003 00:58:50 +0000 (00:58 +0000)
openbox/action.c
openbox/action.h
plugins/keyboard/keysrc
plugins/mouse/mouserc

index ccb988d970f8399db0b603cd9a472a4f4ec3dbd5..521e3135637e4d7fe69d3f81a6429c1d4474e4f3 100644 (file)
@@ -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)
index 95d9bc2cf9de6f49361c15fb4cb81fd710fe6ab5..fae5b6479bcee058073be89b7cae72db5eae00da 100644 (file)
@@ -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);
index d31235c6a3b5214af13ed5dd9f44e0f6650c1304..daa07f53c632f2439280e2703fc747815a56821f 100644 (file)
 #  * 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
index 573d629ee2ecef32e466db0901ae10c2c65f490b..739ac30e902060d00be608573fefbd0b85fef8eb 100644 (file)
 #  * 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
This page took 0.03306 seconds and 4 git commands to generate.