merge r6374-6376 from trunk
authorDana Jansens <danakj@orodu.net>
Sat, 12 May 2007 19:03:39 +0000 (19:03 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 12 May 2007 19:03:39 +0000 (19:03 +0000)
data/rc.xml
data/rc.xsd
openbox/client.c
openbox/config.c
openbox/config.h
openbox/resist.c

index 0119aed6b0c2eb9e20046b5a46669e0b6f01bcde..b3cc82c6d1842af05dfba25ebb7707eb21488a17 100644 (file)
 <resistance>
   <strength>10</strength>
   <screen_edge_strength>20</screen_edge_strength>
-  <edges_hit_layers_below>no</edges_hit_layers_below>
 </resistance>
 
 <focus>
   <focusNew>yes</focusNew>
   <focusLast>no</focusLast>
   <followMouse>no</followMouse>
-  <focusDelay>0</focusDelay>
+  <focusDelay>200</focusDelay>
   <raiseOnFocus>no</raiseOnFocus>
 </focus>
 
   <titleNumber>yes</titleNumber>
   <!--
       avaible characters are NDSLIMC, each can occur at most once.
-      N: client menu
+      N: window icon
       L: window label (AKA title).
       I: iconify
       M: maximize
       C: close
-      S: shade
+      S: shade (roll up/down)
       D: omnipresent (on all desktops).
   -->
   <keepBorder>yes</keepBorder>
       <action name="Raise"/>
     </mousebind> 
     <mousebind button="Middle" action="Press">
-      <action name="ShowMenu"><menu>client-list-menu</menu></action>
+      <action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
     </mousebind> 
     <mousebind button="Right" action="Press">
       <action name="ShowMenu"><menu>root-menu</menu></action>
index 7c7421d816335c3709c343aa6cb0fb118bb1973a..752517633d79af5b444366a93bccf5153150a219 100644 (file)
@@ -36,7 +36,6 @@
         </xsd:annotation>
         <xsd:element minOccurs="0" name="strength" type="xsd:integer"/>
         <xsd:element minOccurs="0" name="screen_edge_strength" type="xsd:integer"/>
-        <xsd:element minOccurs="0" name="edges_hit_layers_below" type="ob:bool"/>
     </xsd:complexType>
     <xsd:complexType name="focus">
         <xsd:annotation>
index ffac20d8f496d3181d7fec855748074922621eab..8428be6b54db3d060cc3c1e0cbfaee0c0f34edb6 100644 (file)
@@ -3710,7 +3710,7 @@ ObClient *client_search_transient(ObClient *self, ObClient *search)
                 continue;                                                     \
             if(cur->iconic)                                                   \
                 continue;                                                     \
-            if(cur->layer < c->layer && !config_resist_layers_below)          \
+            if(cur->layer == c->layer)                                        \
                 continue;
 
 #define HIT_EDGE(my_edge_start, my_edge_end, his_edge_start, his_edge_end) \
index 299c06473cda38a3e6dd082aa009ac558d44a3fb..75a60ff7ebc59f98d58f4903b4f1a5d16369eb0a 100644 (file)
@@ -87,7 +87,6 @@ GSList *config_menu_files;
 
 gint     config_resist_win;
 gint     config_resist_edge;
-gboolean config_resist_layers_below;
 
 GSList *config_per_app_settings;
 
@@ -705,8 +704,6 @@ static void parse_resistance(ObParseInst *i, xmlDocPtr doc, xmlNodePtr 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 = parse_find_node("edges_hit_layers_below", node)))
-        config_resist_layers_below = parse_bool(doc, n);
 }
 
 typedef struct
@@ -882,7 +879,6 @@ void config_startup(ObParseInst *i)
 
     config_resist_win = 10;
     config_resist_edge = 20;
-    config_resist_layers_below = FALSE;
 
     parse_register(i, "resistance", parse_resistance, NULL);
 
index 94991a60dd9cf15067d4e58f11100de8ff6f5846..6a0ee33cb5d8dcefdb524ee09d047cfdf0a8e1e3 100644 (file)
@@ -149,8 +149,6 @@ extern gint config_mouse_dclicktime;
 extern gint config_resist_win;
 /*! Number of pixels to resist while crossing a screen's edge */
 extern gint config_resist_edge;
-/*! Should windows resist edges at layers below */
-extern gboolean config_resist_layers_below;
 
 /*! Warp near edge on menu? */
 extern gboolean config_menu_warppointer;
index 729f83fc891ebf99db7172c2c5a5d5e8d32b1fac..56bd214dbe8e51281812f63d1852b7da5f9e729b 100644 (file)
@@ -57,15 +57,14 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y)
 
         if (!WINDOW_IS_CLIENT(it->data))
             continue;
+        /* only snap in the same layer */
+        if (window_layer(it->data) != c->layer)
+            continue;
         target = it->data;
 
         /* don't snap to self or non-visibles */
         if (!target->frame->visible || target == c) continue; 
 
-        /* don't snap to windows in layers beneath */
-        if(target->layer < c->layer && !config_resist_layers_below)
-            continue;
-
         tl = RECT_LEFT(target->frame->area) - 1;
         tt = RECT_TOP(target->frame->area) - 1;
         tr = RECT_RIGHT(target->frame->area) + 1;
@@ -207,15 +206,14 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
     for (it = stacking_list; it; it = g_list_next(it)) {
         if (!WINDOW_IS_CLIENT(it->data))
             continue;
+        /* only snap in the same layer */
+        if (window_layer(it->data) != c->layer)
+            continue;
         target = it->data;
 
         /* don't snap to invisibles or ourself */
         if (!target->frame->visible || target == c) continue; 
 
-        /* don't snap to windows in layers beneath */
-        if(target->layer < c->layer && !config_resist_layers_below)
-            continue;
-
         tl = RECT_LEFT(target->frame->area);
         tr = RECT_RIGHT(target->frame->area);
         tt = RECT_TOP(target->frame->area);