]> Dogcows Code - chaz/openbox/commitdiff
add the fullscreen action
authorDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 14:39:01 +0000 (14:39 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 14:39:01 +0000 (14:39 +0000)
Makefile.am
openbox/action.c
openbox/actions/all.c
openbox/actions/all.h
openbox/actions/fullscreen.c [new file with mode: 0644]

index 03b9480995a9b951bdfa5b0ce32243433ee9dc28..43dc878856c5ef536ba9f70612895f720cae56bf 100644 (file)
@@ -163,6 +163,7 @@ openbox_openbox_SOURCES = \
        openbox/actions/execute.c \
        openbox/actions/exit.c \
        openbox/actions/focus.c \
+       openbox/actions/fullscreen.c \
        openbox/actions/iconify.c \
        openbox/actions/lower.c \
        openbox/actions/move.c \
index 5393bb8a5935310122e5086b70351d08ac07afbd..50df9f28eb7f2e1079af47304740089a1acca0df 100644 (file)
@@ -569,11 +569,6 @@ ActionString actionstrings[] =
         action_toggle_maximize_vert,
         setup_client_action
     },
-    {
-        "togglefullscreen",
-        action_toggle_fullscreen,
-        setup_client_action
-    },
     {
         "sendtodesktop",
         action_send_to_desktop,
@@ -1215,13 +1210,6 @@ void action_toggle_maximize_vert(union ActionData *data)
     client_action_end(data, config_focus_under_mouse);
 }
 
-void action_toggle_fullscreen(union ActionData *data)
-{
-    client_action_start(data);
-    client_fullscreen(data->client.any.c, !(data->client.any.c->fullscreen));
-    client_action_end(data, config_focus_under_mouse);
-}
-
 void action_send_to_desktop(union ActionData *data)
 {
     ObClient *c = data->sendto.any.c;
index 101cc75fc2cd0147cf0b385f43e480c461d492bb..a7295ac716636e1e52a1da6cb9c43c26accfc802 100644 (file)
@@ -19,4 +19,5 @@ void action_all_startup()
     action_raiselower_startup();
     action_unfocus_startup();
     action_iconify_startup();
+    action_fullscreen_startup();
 }
index 0b6813eb0652ba6e1b8bb2dd497ba378207ca813..238dc3a9907936fe19de1e475410f9729853915a 100644 (file)
@@ -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 (file)
index 0000000..c791191
--- /dev/null
@@ -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;
+}
This page took 0.037267 seconds and 4 git commands to generate.