]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
Don't cancel interactive action when another one is run which shares the same run...
[chaz/openbox] / openbox / config.c
index 7f51e7c8a3f04ba843cd2858306e173b27e235e0..dad98a0b591eca86501d128768747c36c2d76533 100644 (file)
@@ -39,6 +39,8 @@ gboolean config_focus_under_mouse;
 ObPlacePolicy config_place_policy;
 gboolean      config_place_center;
 
+StrutPartial config_margins;
+
 gchar   *config_theme;
 gboolean config_theme_keepborder;
 
@@ -79,6 +81,7 @@ guint config_keyboard_reset_state;
 
 gint config_mouse_threshold;
 gint config_mouse_dclicktime;
+gint config_mouse_screenedgetime;
 
 guint    config_menu_hide_delay;
 gboolean config_menu_middle;
@@ -422,6 +425,8 @@ static void parse_mouse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
         config_mouse_threshold = parse_int(doc, n);
     if ((n = parse_find_node("doubleClickTime", node)))
         config_mouse_dclicktime = parse_int(doc, n);
+    if ((n = parse_find_node("screenEdgeWarpTime", node)))
+        config_mouse_screenedgetime = parse_int(doc, n);
 
     n = parse_find_node("context", node);
     while (n) {
@@ -496,6 +501,23 @@ static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
         config_place_center = parse_bool(doc, n);
 }
 
+static void parse_margins(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
+                          gpointer d)
+{
+    xmlNodePtr n;
+
+    node = node->children;
+    
+    if ((n = parse_find_node("top", node)))
+        config_margins.top = MAX(0, parse_int(doc, n));
+    if ((n = parse_find_node("left", node)))
+        config_margins.left = MAX(0, parse_int(doc, n));
+    if ((n = parse_find_node("right", node)))
+        config_margins.right = MAX(0, parse_int(doc, n));
+    if ((n = parse_find_node("bottom", node)))
+        config_margins.bottom = MAX(0, parse_int(doc, n));
+}
+
 static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
                         gpointer d)
 {
@@ -764,17 +786,14 @@ static void bind_default_keyboard()
 {
     ObDefKeyBind *it;
     ObDefKeyBind binds[] = {
-        { NULL, NULL },
         { "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));
-        g_list_free(l);
     }
 }
 
@@ -790,7 +809,6 @@ static void bind_default_mouse()
 {
     ObDefMouseBind *it;
     ObDefMouseBind binds[] = {
-        { NULL, NULL, 0, NULL },
         { "Left", "Client", OB_MOUSE_ACTION_PRESS, "Focus" },
         { "Middle", "Client", OB_MOUSE_ACTION_PRESS, "Focus" },
         { "Right", "Client", OB_MOUSE_ACTION_PRESS, "Focus" },
@@ -823,7 +841,7 @@ 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, "ToggleMaximizeFull" },
+        { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "ToggleMaximize" },
         { "Left", "Iconify", OB_MOUSE_ACTION_CLICK, "Iconify" },
         { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "ToggleOmnipresent" },
         { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "ToggleShade" },
@@ -831,6 +849,10 @@ static void bind_default_mouse()
         { "Left", "TRCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
         { "Left", "BLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
         { "Left", "BRCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
+        { "Left", "Top", OB_MOUSE_ACTION_MOTION, "Resize" },
+        { "Left", "Bottom", OB_MOUSE_ACTION_MOTION, "Resize" },
+        { "Left", "Left", OB_MOUSE_ACTION_MOTION, "Resize" },
+        { "Left", "Right", OB_MOUSE_ACTION_MOTION, "Resize" },
         { "Left", "Titlebar", OB_MOUSE_ACTION_MOTION, "Move" },
         { "A-Left", "Frame", OB_MOUSE_ACTION_MOTION, "Move" },
         { "A-Middle", "Frame", OB_MOUSE_ACTION_MOTION, "Resize" },
@@ -858,6 +880,10 @@ void config_startup(ObParseInst *i)
 
     parse_register(i, "placement", parse_placement, NULL);
 
+    STRUT_PARTIAL_SET(config_margins, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+    parse_register(i, "margins", parse_margins, NULL);
+
     config_theme = NULL;
 
     config_animate_iconify = TRUE;
@@ -908,6 +934,7 @@ void config_startup(ObParseInst *i)
 
     config_mouse_threshold = 8;
     config_mouse_dclicktime = 200;
+    config_mouse_screenedgetime = 400;
 
     bind_default_mouse();
 
This page took 0.026487 seconds and 4 git commands to generate.