<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
+ <edges_hit_layers_below>no</edges_hit_layers_below>
</resistance>
<focus>
<xs:sequence>
<xs:element name="strength" type="xs:integer"/>
<xs:element name="screen_edge_strength" type="xs:integer"/>
+ <xs:element name="edges_hit_layers_below" type="xs:yesorno"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="focus">
continue;
if(cur->iconic)
continue;
+ if(cur->layer < c->layer && !config_resist_layers_below)
+ continue;
his_edge_start = cur->frame->area.x;
his_edge_end = cur->frame->area.x + cur->frame->area.width;
continue;
if(cur->iconic)
continue;
+ if(cur->layer < c->layer && !config_resist_layers_below)
+ continue;
his_edge_start = cur->frame->area.x;
his_edge_end = cur->frame->area.x + cur->frame->area.width;
continue;
if(cur->iconic)
continue;
+ if(cur->layer < c->layer && !config_resist_layers_below)
+ continue;
his_edge_start = cur->frame->area.y;
his_edge_end = cur->frame->area.y + cur->frame->area.height;
continue;
if(cur->iconic)
continue;
+ if(cur->layer < c->layer && !config_resist_layers_below)
+ continue;
his_edge_start = cur->frame->area.y;
his_edge_end = cur->frame->area.y + cur->frame->area.height;
gint config_resist_win;
gint config_resist_edge;
+gboolean config_resist_layers_below;
+
/*
<keybind key="C-x">
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
config_resist_win = 10;
config_resist_edge = 20;
+ config_resist_layers_below = FALSE;
parse_register(i, "resistance", parse_resistance, NULL);
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;
if (!WINDOW_IS_CLIENT(it->data))
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;
/* 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);