Merge commit 'nightm4re/3.4-working-padding' into wip/mikabox
authorMikael Magnusson <mikachu@gmail.com>
Sat, 23 Aug 2008 04:32:31 +0000 (06:32 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sat, 23 Aug 2008 04:38:34 +0000 (06:38 +0200)
1  2 
data/rc.xml
data/rc.xsd
openbox/client.c
openbox/config.c
openbox/config.h
openbox/resist.c

diff --cc data/rc.xml
Simple merge
diff --cc data/rc.xsd
Simple merge
index 8ee53cf1f5738aab9261d53a59ecd10a12f5759a,749527ddb589da05c59a948a7136003d48cc1132..c9931c8f762773707aed956a611f4aebef9ab5fe
@@@ -4188,9 -4252,13 +4191,13 @@@ void client_find_edge_directional(ObCli
              cur->desktop != screen_desktop)
              continue;
  
 -        ob_debug("trying window %s\n", cur->title);
 +        ob_debug("trying window %s", cur->title);
  
-         detect_edge(cur->frame->area, dir, my_head, my_size, my_edge_start,
+         RECT_SET(expand, cur->frame->area.x - config_window_margin, 
+                          cur->frame->area.y - config_window_margin, 
+                          cur->frame->area.width + config_window_margin * 2, 
+                          cur->frame->area.height + config_window_margin * 2);
+         detect_edge(expand, dir, my_head, my_size, my_edge_start,
                      my_edge_size, dest, near_edge);
      }
      dock_get_area(&dock_area);
index adac23a67da8a561ddf9a1485542bedb436e82e5,bd91432126fd9f79ae74bae6b4319d084fff4b6f..92df37f9757e692b3a0687fddcbfd28ee05f15cd
@@@ -872,12 -818,18 +874,17 @@@ static void parse_resistance(xmlNodePt
      xmlNodePtr n;
  
      node = node->children;
 -    if ((n = parse_find_node("strength", node)))
 -        config_resist_win = parse_int(doc, n);
 -    if ((n = parse_find_node("screen_edge_strength", node)))
 -        config_resist_edge = parse_int(doc, n);
 +    if ((n = obt_parse_find_node(node, "strength")))
 +        config_resist_win = obt_parse_node_int(n);
 +    if ((n = obt_parse_find_node(node, "screen_edge_strength")))
 +        config_resist_edge = obt_parse_node_int(n);
  }
  
 -static void parse_window_margin(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 -                                gpointer data)
++static void parse_window_margin(xmlNodePtr node, gpointer d)
+ {
 -    config_window_margin = parse_int(doc, node);
++    config_window_margin = obt_parse_node_int(node);
+ }
  typedef struct
  {
      const gchar *key;
@@@ -1050,8 -1000,12 +1057,12 @@@ void config_startup(ObtParseInst *i
      config_resist_win = 10;
      config_resist_edge = 20;
  
 -    parse_register(i, "resistance", parse_resistance, NULL);
 +    obt_parse_register(i, "resistance", parse_resistance, NULL);
  
 -    parse_register(i, "windowMargin", parse_window_margin, NULL);
+     config_window_margin = 0;
++    obt_parse_register(i, "windowMargin", parse_window_margin, NULL);
      config_menu_hide_delay = 250;
      config_menu_middle = FALSE;
      config_submenu_show_delay = 0;
Simple merge
index 4c02a14622ab78e2f7a3bd3ff69b8cd851de018a,f6823d3c289a25747cceaf2117018261cb96dd58..aedb94480f3be2d00183e54d06a3868ae556fc17
@@@ -118,7 -123,11 +121,8 @@@ void resist_move_windows(ObClient *c, g
          /* don't snap to self or non-visibles */
          if (!target->frame->visible || target == c)
              continue;
 -        /* don't snap to windows set to below and skip_taskbar (desklets) */
 -        if (target->below && !c->below && target->skip_taskbar)
 -            continue;
  
+         /* check window boundary as it is */
          if (resist_move_window(c->frame->area, target->frame->area,
                                 resist, x, y))
              break;
@@@ -303,7 -326,11 +321,8 @@@ void resist_size_windows(ObClient *c, g
          /* don't snap to invisibles or ourself */
          if (!target->frame->visible || target == c)
              continue;
 -        /* don't snap to windows set to below and skip_taskbar (desklets) */
 -        if (target->below && !c->below && target->skip_taskbar)
 -            continue;
  
+         /* check window boundary as it is */
          if (resist_size_window(c->frame->area, target->frame->area,
                                 resist, w, h, dir))
              break;