summaryrefslogtreecommitdiff
path: root/openbox/actions
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-22 14:28:21 +0000
committerDana Jansens <danakj@orodu.net>2007-06-22 14:28:21 +0000
commita5c2aadf2778d6ab4105abd457cd2ab21a1172ec (patch)
tree53b7e1731fef9a96d5a3b77e28414f2538f25f38 /openbox/actions
parenta07465f376b0a33270532501127ec812efe2c2b2 (diff)
add lower and raiselower actions
Diffstat (limited to 'openbox/actions')
-rw-r--r--openbox/actions/all.c2
-rw-r--r--openbox/actions/all.h2
-rw-r--r--openbox/actions/lower.c24
-rw-r--r--openbox/actions/raiselower.c24
4 files changed, 52 insertions, 0 deletions
diff --git a/openbox/actions/all.c b/openbox/actions/all.c
index 4bc4814a..c4edc5c3 100644
--- a/openbox/actions/all.c
+++ b/openbox/actions/all.c
@@ -15,4 +15,6 @@ void action_all_startup()
action_move_startup();
action_focus_startup();
action_raise_startup();
+ action_lower_startup();
+ action_raiselower_startup();
}
diff --git a/openbox/actions/all.h b/openbox/actions/all.h
index 01716e39..48b6d1c1 100644
--- a/openbox/actions/all.h
+++ b/openbox/actions/all.h
@@ -16,5 +16,7 @@ void action_close_startup();
void action_move_startup();
void action_focus_startup();
void action_raise_startup();
+void action_lower_startup();
+void action_raiselower_startup();
#endif
diff --git a/openbox/actions/lower.c b/openbox/actions/lower.c
new file mode 100644
index 00000000..1abf5903
--- /dev/null
+++ b/openbox/actions/lower.c
@@ -0,0 +1,24 @@
+#include "openbox/actions.h"
+#include "openbox/stacking.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_lower_startup()
+{
+ actions_register("Lower",
+ NULL, NULL,
+ run_func,
+ NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func(ObActionsData *data, gpointer options)
+{
+ if (data->client) {
+ actions_client_move(data, TRUE);
+ stacking_lower(CLIENT_AS_WINDOW(data->client));
+ actions_client_move(data, FALSE);
+ }
+
+ return FALSE;
+}
diff --git a/openbox/actions/raiselower.c b/openbox/actions/raiselower.c
new file mode 100644
index 00000000..f75410ac
--- /dev/null
+++ b/openbox/actions/raiselower.c
@@ -0,0 +1,24 @@
+#include "openbox/actions.h"
+#include "openbox/stacking.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_raiselower_startup()
+{
+ actions_register("RaiseLower",
+ NULL, NULL,
+ run_func,
+ NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func(ObActionsData *data, gpointer options)
+{
+ if (data->client) {
+ actions_client_move(data, TRUE);
+ stacking_restack_request(data->client, NULL, Opposite);
+ actions_client_move(data, FALSE);
+ }
+
+ return FALSE;
+}