X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fresistance.c;h=628802bd895f7aa98739e9c4530f876eae17414f;hb=53882f760966958eca25b3277c8e7db61a8cdf10;hp=68106abf2b17eeb2bb67d3cb4ecb015d50501f2a;hpb=23ee7b9a934d5aef2835b684edb9192fa11feb06;p=chaz%2Fopenbox diff --git a/plugins/resistance.c b/plugins/resistance.c index 68106abf..628802bd 100644 --- a/plugins/resistance.c +++ b/plugins/resistance.c @@ -38,6 +38,8 @@ static void resist(Client *c, int *x, int *y) int tl, tt, tr, tb; /* 1 past the target's edges on each side */ target = it->data; + /* don't snap to self or non-visibles */ + if (!target->frame->visible || target == c) continue; tl = target->frame->area.x - 1; tt = target->frame->area.y - 1;