X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fresistance.c;h=24e291a049b8d70becaef1581670f2d5da0763d2;hb=f3153710eaf2662f0c10f6c2265b2aa5b3a31390;hp=68106abf2b17eeb2bb67d3cb4ecb015d50501f2a;hpb=23ee7b9a934d5aef2835b684edb9192fa11feb06;p=chaz%2Fopenbox diff --git a/plugins/resistance.c b/plugins/resistance.c index 68106abf..24e291a0 100644 --- a/plugins/resistance.c +++ b/plugins/resistance.c @@ -5,6 +5,10 @@ #include "../kernel/screen.h" #include +void plugin_setup_config() +{ +} + static int resistance = 10; static gboolean window_resistance = TRUE; /* window-to-window */ @@ -38,6 +42,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;