changes for the 3.4 branch from master (svn trunk)
authorDana Jansens <danakj@orodu.net>
Thu, 12 Jul 2007 07:08:40 +0000 (03:08 -0400)
committerDana Jansens <danakj@orodu.net>
Fri, 13 Jul 2007 04:42:01 +0000 (00:42 -0400)
Signed-off-by: Dana Jansens <danakj@orodu.net>
28 files changed:
Makefile.am
data/rc.xsd
openbox/actions/addremovedesktop.c
openbox/actions/all.c
openbox/actions/all.h
openbox/actions/cyclewindows.c
openbox/actions/decorations.c
openbox/actions/desktop.c
openbox/actions/directionalcyclewindows.c
openbox/actions/directionaldesktop.c
openbox/actions/directionaltargetwindow.c
openbox/actions/dockautohide.c
openbox/actions/execute.c
openbox/actions/focus.c
openbox/actions/fullscreen.c
openbox/actions/growtoedge.c
openbox/actions/layer.c
openbox/actions/maximize.c
openbox/actions/maximizehorizontal.c
openbox/actions/maximizevertical.c
openbox/actions/menu.c
openbox/actions/omnipresent.c
openbox/actions/resizerelative.c
openbox/actions/shade.c
openbox/actions/showdesktop.c
openbox/actions/unfocus.c
openbox/config.c
openbox/frame.c

index 27114f80349e186222dadb39250a41c093ab69e0..03b3c15fe83c4fd350b886737c32933ca1569b06 100644 (file)
@@ -164,6 +164,7 @@ openbox_openbox_SOURCES = \
        openbox/actions/execute.c \
        openbox/actions/exit.c \
        openbox/actions/focus.c \
+       openbox/actions/focustobottom.c \
        openbox/actions/fullscreen.c \
        openbox/actions/growtoedge.c \
        openbox/actions/iconify.c \
@@ -174,7 +175,6 @@ openbox_openbox_SOURCES = \
        openbox/actions/maximize.c \
        openbox/actions/maximizehorizontal.c \
        openbox/actions/maximizevertical.c \
-       openbox/actions/menu.c \
        openbox/actions/move.c \
        openbox/actions/moverelative.c \
        openbox/actions/moveresizeto.c \
@@ -188,6 +188,7 @@ openbox_openbox_SOURCES = \
        openbox/actions/restart.c \
        openbox/actions/shade.c \
        openbox/actions/showdesktop.c \
+       openbox/actions/showmenu.c \
        openbox/actions/unfocus.c \
        openbox/actions.c \
        openbox/actions.h \
index debac5bb6ff64a3f636638235ba418c808e6f10a..aa1c45a93a022a6e436b469f63aa86c825bfada5 100644 (file)
@@ -3,8 +3,8 @@
 <!-- XML Schema for the Openbox window manager configuration file -->
 
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-    targetNamespace="http://openbox.org/4.0/rc"
-    xmlns:ob="http://openbox.org/4.0/rc"
+    targetNamespace="http://openbox.org/3.4/rc"
+    xmlns:ob="http://openbox.org/3.4/rc"
     elementFormDefault="qualified">
     <!--
          root node
             <xsd:enumeration value="Reconfigure"/>
             <xsd:enumeration value="Resize"/>
             <xsd:enumeration value="ResizeRelative"/>
-            <xsd:enumeration value="ResizeRelativeHorz"/>
-            <xsd:enumeration value="ResizeRelativeVert"/>
             <xsd:enumeration value="Restart"/>
             <xsd:enumeration value="SendToBottomLayer"/>
             <xsd:enumeration value="SendToDesktop"/>
             <xsd:enumeration value="Left"/>
             <xsd:enumeration value="Right"/>
             <xsd:enumeration value="Bottom"/>
+            <xsd:enumeration value="Handle"/>
             <xsd:enumeration value="Maximize"/>
             <xsd:enumeration value="AllDesktops"/>
             <xsd:enumeration value="Shade"/>
index c8904d3c18a61a33986a62083560424ae632de2c..91ccc91135d144880ac1e4bba2492e5bd8bcc6d9 100644 (file)
@@ -11,6 +11,14 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static gpointer setup_add_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static gpointer setup_remove_func(ObParseInst *i,
                                   xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_addcurrent_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_addlast_func(ObParseInst *i,
+                                   xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_removecurrent_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_removelast_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -26,6 +34,26 @@ void action_addremovedesktop_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("AddDesktopLast",
+                     setup_addlast_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("RemoveDesktopLast",
+                     setup_removelast_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("AddDesktopCurrent",
+                     setup_addcurrent_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("RemoveDesktopCurrent",
+                     setup_removecurrent_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -62,6 +90,38 @@ static gpointer setup_remove_func(ObParseInst *i,
     return o;
 }
 
+static gpointer setup_addcurrent_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_add_func(i, doc, node);
+    o->current = TRUE;
+    return o;
+}
+
+static gpointer setup_addlast_func(ObParseInst *i,
+                                   xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_add_func(i, doc, node);
+    o->current = FALSE;
+    return o;
+}
+
+static gpointer setup_removecurrent_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_remove_func(i, doc, node);
+    o->current = TRUE;
+    return o;
+}
+
+static gpointer setup_removelast_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_remove_func(i, doc, node);
+    o->current = FALSE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 1bf963aceb9c0717a7eab7e32051b07a34794e4d..6f2f0772e423302b93769e2ca3ea707752badae8 100644 (file)
@@ -4,7 +4,7 @@ void action_all_startup()
 {
     action_execute_startup();
     action_debug_startup();
-    action_menu_startup();
+    action_showmenu_startup();
     action_showdesktop_startup();
     action_reconfigure_startup();
     action_exit_startup();
@@ -41,4 +41,5 @@ void action_all_startup()
     action_movetoedge_startup();
     action_growtoedge_startup();
     action_if_startup();
+    action_focustobottom_startup();
 }
index acb54dcd357951ba6cdd4ba2aafc7670e441f9e3..ebc2c7c9176cf857f1667c3d2c0b7869c47d86d4 100644 (file)
@@ -5,7 +5,7 @@ void action_all_startup();
 
 void action_execute_startup();
 void action_debug_startup();
-void action_menu_startup();
+void action_showmenu_startup();
 void action_showdesktop_startup();
 void action_reconfigure_startup();
 void action_exit_startup();
@@ -42,5 +42,6 @@ void action_layer_startup();
 void action_movetoedge_startup();
 void action_growtoedge_startup();
 void action_if_startup();
+void action_focustobottom_startup();
 
 #endif
index 23b2c516a330b019e13d88c0d6592b25fa4918eb..21cab19a3e1c9fba8b754c81b17037a14b85e456 100644 (file)
@@ -2,6 +2,7 @@
 #include "openbox/event.h"
 #include "openbox/focus_cycle.h"
 #include "openbox/openbox.h"
+#include "openbox/client.h"
 #include "gettext.h"
 
 typedef struct {
@@ -17,6 +18,8 @@ typedef struct {
 static gboolean cycling = FALSE;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_next_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
+static gpointer setup_prev_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 static gboolean i_input_func(guint initial_state,
@@ -35,6 +38,18 @@ void action_cyclewindows_startup()
                      run_func,
                      i_input_func,
                      i_cancel_func);
+    actions_register("NextWindow",
+                     setup_next_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("PreviousWindow",
+                     setup_prev_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -72,6 +87,20 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_next_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->forward = TRUE;
+    return o;
+}
+
+static gpointer setup_prev_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->forward = FALSE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
@@ -151,10 +180,13 @@ static void end_cycle(gboolean cancel, guint state, Options *o)
                      TRUE,
                      o->dialog,
                      TRUE, cancel);
+    cycling = FALSE;
 
     if (ft) {
-        actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
-                         state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+        if (o->actions)
+            actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
+                             state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+        else
+            client_activate(ft, FALSE, TRUE, TRUE, TRUE);
     }
-    cycling = FALSE;
 }
index a8f0929cf7e39c46e504ab7d6c6c4528d7e755fe..4c6618019121f8988b67cf9350e6791446821b47 100644 (file)
@@ -7,6 +7,8 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -17,6 +19,11 @@ void action_decorations_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("ToggleDecorations",
+                     setup_toggle_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -39,6 +46,14 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 4489f8122dfbbea9da5e2b02f2f90fa5577bb50a..abe48b74eede34636152be024ed204abd97a63f5 100644 (file)
@@ -11,6 +11,8 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
+static gpointer setup_last_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -21,6 +23,16 @@ void action_desktop_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("DesktopLast",
+                     setup_last_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktop",
+                     setup_send_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -47,6 +59,20 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
+static gpointer setup_last_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->last = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 3eea00d1bd01c7deefaa7615183662a766100959..b3c2104c74737432f30c022826782c4d345c5fa5 100644 (file)
@@ -2,6 +2,7 @@
 #include "openbox/event.h"
 #include "openbox/focus_cycle.h"
 #include "openbox/openbox.h"
+#include "openbox/client.h"
 #include "openbox/misc.h"
 #include "gettext.h"
 
@@ -14,6 +15,22 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_north_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northwest_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northeast_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southwest_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southeast_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 static gboolean i_input_func(guint initial_state,
@@ -32,6 +49,54 @@ void action_directionalcyclewindows_startup()
                      run_func,
                      i_input_func,
                      i_cancel_func);
+    actions_register("DirectionalFocusNorth",
+                     setup_north_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusSouth",
+                     setup_south_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusWest",
+                     setup_west_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusEast",
+                     setup_east_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusNorthWest",
+                     setup_northwest_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusNorthEast",
+                     setup_northeast_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusSouthWest",
+                     setup_southwest_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
+    actions_register("DirectionalFocusSouthEast",
+                     setup_southeast_func,
+                     free_func,
+                     run_func,
+                     i_input_func,
+                     i_cancel_func);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -86,6 +151,66 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_north_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_south_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_west_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_WEST;
+    return o;
+}
+
+static gpointer setup_east_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_northwest_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_NORTHWEST;
+    return o;
+}
+
+static gpointer setup_northeast_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_NORTHEAST;
+    return o;
+}
+
+static gpointer setup_southwest_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_SOUTHWEST;
+    return o;
+}
+
+static gpointer setup_southeast_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->direction = OB_DIRECTION_SOUTHEAST;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
@@ -159,7 +284,10 @@ static void end_cycle(gboolean cancel, guint state, Options *o)
                                  TRUE, cancel);
 
     if (ft) {
-        actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
-                         state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+        if (o->actions)
+            actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
+                             state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+        else
+            client_activate(ft, FALSE, TRUE, TRUE, TRUE);
     }
 }
index d9aacdd8925b42e0d2d1c3c5bb156bdc254147eb..52c7cb5c7903becd1e1c6519e23b2d75c950be65 100644 (file)
@@ -12,6 +12,30 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_next_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_prev_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_left_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_right_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_up_func(ObParseInst *i,
+                              xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_down_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendnext_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendprev_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendleft_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendright_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendup_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_senddown_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -22,6 +46,66 @@ void action_directionaldesktop_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("DesktopNext",
+                     setup_next_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("DesktopPrevious",
+                     setup_prev_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("DesktopLeft",
+                     setup_left_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("DesktopRight",
+                     setup_right_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("DesktopUp",
+                     setup_up_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("DesktopDown",
+                     setup_down_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopNext",
+                     setup_sendnext_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopPrevious",
+                     setup_sendprev_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopLeft",
+                     setup_sendleft_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopRight",
+                     setup_sendright_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopUp",
+                     setup_sendup_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopDown",
+                     setup_senddown_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -68,6 +152,108 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_next_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->linear = TRUE;
+    o->dir = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_prev_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->linear = TRUE;
+    o->dir = OB_DIRECTION_WEST;
+    return o;
+}
+
+static gpointer setup_right_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->linear = FALSE;
+    o->dir = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_left_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->linear = FALSE;
+    o->dir = OB_DIRECTION_WEST;
+    return o;
+}
+
+static gpointer setup_up_func(ObParseInst *i,
+                              xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->linear = FALSE;
+    o->dir = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_down_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->linear = FALSE;
+    o->dir = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_sendnext_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_next_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
+static gpointer setup_sendprev_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_prev_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
+static gpointer setup_sendright_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_right_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
+static gpointer setup_sendleft_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_left_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
+static gpointer setup_sendup_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_up_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
+static gpointer setup_senddown_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_down_func(i, doc, node);
+    o->send = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 9cebda2716fe7158d91a6d1ba44cdd0f6e49939f..82f3abf543ac8c518e926a8a0f945fc62a1fb207 100644 (file)
@@ -101,9 +101,14 @@ static gboolean run_func(ObActionsData *data, gpointer options)
                                  o->dialog,
                                  TRUE, FALSE);
 
-    if (ft)
-        actions_run_acts(o->actions, data->uact, data->state,
-                         data->x, data->y, data->button, data->context, ft);
+    if (ft) {
+        if (o->actions)
+            actions_run_acts(o->actions, data->uact, data->state,
+                             data->x, data->y, data->button, data->context,
+                             ft);
+        else
+            client_activate(ft, FALSE, TRUE, TRUE, TRUE);
+    }
 
     return FALSE;
 }
index e7f650551550cd791b4d999f27c694414e489c24..9e035b819a2c92625c538dba253e9dac74e6621a 100644 (file)
@@ -6,7 +6,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_dockautohide_startup()
 {
-    actions_register("DockAutoHide",
+    actions_register("ToggleDockAutoHide",
                      NULL, NULL,
                      run_func,
                      NULL, NULL);
index 7e58fe7c7c0178ea9550d14b00f8de2853df1a52..caf1347b379ab8fa4f263a5a47641de296357986 100644 (file)
@@ -39,7 +39,9 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
 
     o = g_new0(Options, 1);
 
-    if ((n = parse_find_node("command", node))) {
+    if ((n = parse_find_node("command", node)) ||
+        (n = parse_find_node("execute", node)))
+    {
         gchar *s = parse_string(doc, n);
         o->cmd = parse_expand_tilde(s);
         g_free(s);
index d0acfbd9c69a7c72074ef210419b7ba8867b928c..5e356141707782245ed643d7d8854c7ea1cc7e89 100644 (file)
@@ -5,9 +5,12 @@
 
 typedef struct {
     gboolean here;
+    gboolean activate;
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_activate_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -18,6 +21,11 @@ void action_focus_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("Activate",
+                     setup_activate_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -32,6 +40,14 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_activate_func(ObParseInst *i,
+                                    xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = setup_func(i, doc, node);
+    o->activate = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
@@ -55,7 +71,8 @@ static gboolean run_func(ObActionsData *data, gpointer options)
             (data->context != OB_FRAME_CONTEXT_CLIENT &&
              data->context != OB_FRAME_CONTEXT_FRAME))
         {
-            client_activate(data->client, o->here, FALSE, FALSE, TRUE);
+            client_activate(data->client, o->here,
+                            o->activate, o->activate, TRUE);
         }
     } else if (data->context == OB_FRAME_CONTEXT_DESKTOP) {
         /* focus action on the root window. make keybindings work for this
index c791191ee56c318846b05463c0e30049b64acac5..008208547a86cc89f04401958cda6e7b632cba14 100644 (file)
@@ -9,6 +9,10 @@ void action_fullscreen_startup()
                      NULL, NULL,
                      run_func,
                      NULL, NULL);
+    actions_register("ToggleFullscreen",
+                     NULL, NULL,
+                     run_func,
+                     NULL, NULL);
 }
 
 /* Always return FALSE because its not interactive */
index fffcc4e0e199722f72ea2208e30061cb0a34807e..2551df0b4b5eb75d531203acdcf50774ea0b5c31 100644 (file)
@@ -10,6 +10,14 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_north_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -20,6 +28,26 @@ void action_growtoedge_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("GrowToEdgeNorth",
+                     setup_north_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("GrowToEdgeSouth",
+                     setup_south_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("GrowToEdgeEast",
+                     setup_east_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("GrowToEdgeWest",
+                     setup_west_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -50,6 +78,38 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_north_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_south_func(ObParseInst *i,
+                                 xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_east_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_west_func(ObParseInst *i,
+                                xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_WEST;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 6f83983d4b89f8a62f464123929112efced0cd7a..87df62006bd7fc1e1316e25f870add0e48171e33 100644 (file)
@@ -8,6 +8,16 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggletop_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_togglebottom_func(ObParseInst *i,
+                                        xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendtop_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendbottom_func(ObParseInst *i,
+                                        xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendnormal_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -18,6 +28,31 @@ void action_layer_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("ToggleAlwaysOnTop",
+                     setup_toggletop_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("ToggleAlwaysOnBottom",
+                     setup_togglebottom_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToTopLayer",
+                     setup_sendtop_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToBottomLayer",
+                     setup_sendbottom_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("SendToNormalLayer",
+                     setup_sendnormal_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -53,6 +88,51 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_toggletop_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    o->layer = 1;
+    return o;
+}
+
+static gpointer setup_togglebottom_func(ObParseInst *i,
+                                        xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    o->layer = -1;
+    return o;
+}
+
+static gpointer setup_sendtop_func(ObParseInst *i,
+                                     xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    o->layer = 1;
+    return o;
+}
+
+static gpointer setup_sendbottom_func(ObParseInst *i,
+                                        xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    o->layer = -1;
+    return o;
+}
+
+static gpointer setup_sendnormal_func(ObParseInst *i,
+                                      xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    o->layer = 0;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 443ff7e76bbd3d85432046390481d52ad425c30e..3af1eb02bf25e0bdc7affb299f8fea9d46af219c 100644 (file)
@@ -7,6 +7,10 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -17,6 +21,21 @@ void action_maximize_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("MaximizeFull",
+                     setup_on_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("UnmaximizeFull",
+                     setup_off_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("ToggleMaximizeFull",
+                     setup_toggle_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -39,6 +58,28 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    return o;
+}
+
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = FALSE;
+    return o;
+}
+
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index abb8a8e1e665b2deee40f30f7bcbae1256dcefcc..525f10172647ffb57a4d517b9e3831903d02ca35 100644 (file)
@@ -7,6 +7,10 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -17,6 +21,21 @@ void action_maximizehorizontal_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("MaximizeHorz",
+                     setup_on_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("UnmaximizeHorz",
+                     setup_off_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("ToggleMaximizeHorz",
+                     setup_toggle_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -39,6 +58,28 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    return o;
+}
+
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = FALSE;
+    return o;
+}
+
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 516463c768c193eb62bce7bfbcad77d73aacde1e..cb2316e33b15170a1d331a7111a10845ade1b908 100644 (file)
@@ -7,6 +7,10 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
@@ -17,6 +21,21 @@ void action_maximizevertical_startup()
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("MaximizeVert",
+                     setup_on_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("UnmaximizeVert",
+                     setup_off_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("ToggleMaximizeVert",
+                     setup_toggle_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -39,6 +58,28 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    return o;
+}
+
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = FALSE;
+    return o;
+}
+
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 64a4d27993163c218bc6f7b6bc948988e7b51e58..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,57 +0,0 @@
-#include "openbox/actions.h"
-#include "openbox/menu.h"
-#include <glib.h>
-
-typedef struct {
-    gchar   *name;
-} Options;
-
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
-static void     free_func(gpointer options);
-static gboolean run_func(ObActionsData *data, gpointer options);
-
-void action_menu_startup()
-{
-    actions_register("Menu",
-                     setup_func,
-                     free_func,
-                     run_func,
-                     NULL, NULL);
-}
-
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
-{
-    xmlNodePtr n;
-    Options *o;
-
-    o = g_new0(Options, 1);
-
-    if ((n = parse_find_node("menu", node)))
-        o->name = parse_string(doc, n);
-    return o;
-}
-
-static void free_func(gpointer options)
-{
-    Options *o = options;
-
-    if (o) {
-        g_free(o->name);
-        g_free(o);
-    }
-}
-
-/* Always return FALSE because its not interactive */
-static gboolean run_func(ObActionsData *data, gpointer options)
-{
-    Options *o = options;
-
-    /* you cannot call ShowMenu from inside a menu */
-    if (data->uact == OB_USER_ACTION_MENU_SELECTION) return FALSE;
-
-    if (o->name) {
-        menu_show(o->name, data->x, data->y, data->button != 0, data->client);
-    }
-
-    return FALSE;
-}
index 92cdfb32004f73556d355964c70198310729380c..0f29f9ff802293365eb5b8d36d6629e2a7b2ccd1 100644 (file)
@@ -8,16 +8,23 @@ typedef struct {
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_omnipresent_startup()
 {
-    actions_register("omnipresent",
+    actions_register("Omnipresent",
                      setup_func,
                      free_func,
                      run_func,
                      NULL, NULL);
+    actions_register("ToggleOmnipresent",
+                     setup_toggle_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -40,6 +47,14 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     return o;
 }
 
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
+    return o;
+}
+
 static void free_func(gpointer options)
 {
     Options *o = options;
index 075c9e7348dcf3088e642c5375c9962588506889..668a063fec2ab0fd2989c9aad7a60f676f1be94e 100644 (file)
@@ -35,9 +35,11 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
         o->left = parse_int(doc, n);
     if ((n = parse_find_node("right", node)))
         o->right = parse_int(doc, n);
-    if ((n = parse_find_node("top", node)))
+    if ((n = parse_find_node("top", node)) ||
+        (n = parse_find_node("up", node)))
         o->top = parse_int(doc, n);
-    if ((n = parse_find_node("bottom", node)))
+    if ((n = parse_find_node("bottom", node)) ||
+        (n = parse_find_node("down", node)))
         o->bottom = parse_int(doc, n);
 
     return o;
index d28f91ed8863363c4e0e7c1e3d131625969a760d..29f28cdbca06295f4f728574561d9071c0854d37 100644 (file)
@@ -6,36 +6,51 @@ typedef struct {
     gboolean on;
 } Options;
 
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_shade_startup()
 {
     actions_register("Shade",
-                     setup_func,
+                     setup_on_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("Unshade",
+                     setup_off_func,
+                     free_func,
+                     run_func,
+                     NULL, NULL);
+    actions_register("ToggleShade",
+                     setup_toggle_func,
                      free_func,
                      run_func,
                      NULL, NULL);
 }
 
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
 {
-    xmlNodePtr n;
-    Options *o;
-
-    o = g_new0(Options, 1);
-    o->toggle = TRUE;
+    Options *o = g_new0(Options, 1);
+    o->on = TRUE;
+    return o;
+}
 
-    if ((n = parse_find_node("state", node))) {
-        gchar *s = parse_string(doc, n);
-        if (g_ascii_strcasecmp(s, "toggle")) {
-            o->toggle = FALSE;
-            o->on = parse_bool(doc, n);
-        }
-        g_free(s);
-    }
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->on = FALSE;
+    return o;
+}
 
+static gpointer setup_toggle_func(ObParseInst *i,
+                                  xmlDocPtr doc, xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->toggle = TRUE;
     return o;
 }
 
index 8781f95d42a79f776f95955f9400bad0feec8dfe..03528362962111c350a2e36523deee4f27becb94 100644 (file)
@@ -5,7 +5,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_showdesktop_startup()
 {
-    actions_register("ShowDesktop",
+    actions_register("ToggleShowDesktop",
                      NULL, NULL,
                      run_func,
                      NULL, NULL);
index d581864e99ec8afff4ace2713fd04f6a515bc7f2..8fda5bf02d1c2bdb23165cbee20569c3a6c9a993 100644 (file)
@@ -24,7 +24,7 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     Options *o;
 
     o = g_new0(Options, 1);
-    o->tobottom = TRUE;
+    o->tobottom = FALSE;
 
     if ((n = parse_find_node("tobottom", node)))
         o->tobottom = parse_bool(doc, n);
index 72ac4108accf3989958c78d7fbf5db44d156a7c2..c8dfac60d01db25cfa34d6a9e1a2874f138641d0 100644 (file)
@@ -782,6 +782,22 @@ typedef struct
     const gchar *actname;
 } ObDefKeyBind;
 
+static void bind_default_keyboard()
+{
+    ObDefKeyBind *it;
+    ObDefKeyBind binds[] = {
+        { "A-Tab", "NextWindow" },
+        { "S-A-Tab", "PreviousWindow" },
+        { "A-F4", "Close" },
+        { NULL, NULL }
+    };
+
+    for (it = binds; it->key; ++it) {
+        GList *l = g_list_append(NULL, g_strdup(it->key));
+        keyboard_bind(l, actions_parse_string(it->actname));
+    }
+}
+
 typedef struct
 {
     const gchar *button;
@@ -826,10 +842,10 @@ static void bind_default_mouse()
         { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "Raise" },
         { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "Raise" },
         { "Left", "Close", OB_MOUSE_ACTION_CLICK, "Close" },
-        { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "Maximize" },
+        { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "ToggleMaximizeFull" },
         { "Left", "Iconify", OB_MOUSE_ACTION_CLICK, "Iconify" },
-        { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "Omnipresent" },
-        { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "Shade" },
+        { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "ToggleOmnipresent" },
+        { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "ToggleShade" },
         { "Left", "TLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
         { "Left", "TRCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
         { "Left", "BLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
@@ -913,6 +929,8 @@ void config_startup(ObParseInst *i)
     translate_key("C-g", &config_keyboard_reset_state,
                   &config_keyboard_reset_keycode);
 
+    bind_default_keyboard();
+
     parse_register(i, "keyboard", parse_keyboard, NULL);
 
     config_mouse_threshold = 8;
index a4843d6ff9f577f5407c57e1120f2cf18f07855b..e719258770d18664ef030253cdb9b87229161557 100644 (file)
@@ -1252,6 +1252,8 @@ ObFrameContext frame_context_from_string(const gchar *name)
         return OB_FRAME_CONTEXT_TOP;
     else if (!g_ascii_strcasecmp("Bottom", name))
         return OB_FRAME_CONTEXT_BOTTOM;
+    else if (!g_ascii_strcasecmp("Handle", name))
+        return OB_FRAME_CONTEXT_BOTTOM;
     else if (!g_ascii_strcasecmp("Left", name))
         return OB_FRAME_CONTEXT_LEFT;
     else if (!g_ascii_strcasecmp("Right", name))