summaryrefslogtreecommitdiff
path: root/openbox/actions
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-22 14:39:01 +0000
committerDana Jansens <danakj@orodu.net>2007-06-22 14:39:01 +0000
commit1eb727064a4ad19c89b55d08d68e8d4b85c0b1d7 (patch)
tree3fbad1c117e78ecaeb18945b409e82ac94180e42 /openbox/actions
parentcf478381b3e386dc0478403cf1a73b4d3ec6fa61 (diff)
add the fullscreen action
Diffstat (limited to 'openbox/actions')
-rw-r--r--openbox/actions/all.c1
-rw-r--r--openbox/actions/all.h1
-rw-r--r--openbox/actions/fullscreen.c24
3 files changed, 26 insertions, 0 deletions
diff --git a/openbox/actions/all.c b/openbox/actions/all.c
index 101cc75f..a7295ac7 100644
--- a/openbox/actions/all.c
+++ b/openbox/actions/all.c
@@ -19,4 +19,5 @@ void action_all_startup()
action_raiselower_startup();
action_unfocus_startup();
action_iconify_startup();
+ action_fullscreen_startup();
}
diff --git a/openbox/actions/all.h b/openbox/actions/all.h
index 0b6813eb..238dc3a9 100644
--- a/openbox/actions/all.h
+++ b/openbox/actions/all.h
@@ -20,5 +20,6 @@ void action_lower_startup();
void action_raiselower_startup();
void action_unfocus_startup();
void action_iconify_startup();
+void action_fullscreen_startup();
#endif
diff --git a/openbox/actions/fullscreen.c b/openbox/actions/fullscreen.c
new file mode 100644
index 00000000..c791191e
--- /dev/null
+++ b/openbox/actions/fullscreen.c
@@ -0,0 +1,24 @@
+#include "openbox/actions.h"
+#include "openbox/client.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_fullscreen_startup()
+{
+ actions_register("Fullscreen",
+ 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);
+ client_fullscreen(data->client, !data->client->fullscreen);
+ actions_client_move(data, FALSE);
+ }
+
+ return FALSE;
+}