remove the edges_hit_layers_below option. don't use windows in other layers for resistance
Dana Jansens danakj@orodu.net
6 files changed,
7 insertions(+),
17 deletions(-)
M
data/rc.xml
→
data/rc.xml
@@ -10,7 +10,6 @@
<resistance> <strength>10</strength> <screen_edge_strength>20</screen_edge_strength> - <edges_hit_layers_below>no</edges_hit_layers_below> </resistance> <focus>
M
data/rc.xsd
→
data/rc.xsd
@@ -36,7 +36,6 @@ <xsd:documentation>defines behaviour of windows when close to each other or the screen edge</xsd:documentation>
</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>
M
openbox/client.c
→
openbox/client.c
@@ -3710,7 +3710,7 @@ if(screen_desktop != cur->desktop && cur->desktop != DESKTOP_ALL) \
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) \
M
openbox/config.c
→
openbox/config.c
@@ -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 @@ 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 = parse_find_node("edges_hit_layers_below", node))) - config_resist_layers_below = parse_bool(doc, n); } typedef struct@@ -882,7 +879,6 @@ parse_register(i, "mouse", parse_mouse, NULL);
config_resist_win = 10; config_resist_edge = 20; - config_resist_layers_below = FALSE; parse_register(i, "resistance", parse_resistance, NULL);
M
openbox/config.h
→
openbox/config.h
@@ -149,8 +149,6 @@ /*! Number of pixels to resist while crossing another window's edge */
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;
M
openbox/resist.c
→
openbox/resist.c
@@ -57,14 +57,13 @@ gint tl, tt, tr, tb; /* 1 past the target's edges on each side */
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;@@ -207,14 +206,13 @@
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);