X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fresist.c;h=bda7760136508530e7eb75ab0d195a119795ce67;hb=a8a93d7d39b3cc82a25d99c9c639c97a5facbfec;hp=c88f594849ff63be7078ba1409df42719c6dff20;hpb=174de91c343dfbdfe866e566393bf4790ae22596;p=chaz%2Fopenbox diff --git a/openbox/resist.c b/openbox/resist.c index c88f5948..bda77601 100644 --- a/openbox/resist.c +++ b/openbox/resist.c @@ -1,6 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- resist.c for the Openbox window manager + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -54,9 +55,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 +201,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);