diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2004-09-04 19:45:38 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2004-09-04 19:45:38 +0000 |
| commit | c02f68499f8cb001f48cbc6d4af43a6fe9cf681d (patch) | |
| tree | d6a918ce384db3713792e0ba51565088bd4a0f3a /openbox/resist.c | |
| parent | 1ed2670b891929be289b4099ee752a592e8f123b (diff) | |
option to make dragging and findedge ignore windows on lower layers
Diffstat (limited to 'openbox/resist.c')
| -rw-r--r-- | openbox/resist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openbox/resist.c b/openbox/resist.c index c88f5948..42c03675 100644 --- a/openbox/resist.c +++ b/openbox/resist.c @@ -54,9 +54,14 @@ void resist_move_windows(ObClient *c, gint *x, gint *y) 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; @@ -195,6 +200,10 @@ void resist_size_windows(ObClient *c, gint *w, gint *h, ObCorner corn) /* 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); |
