X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fresistance.c;h=24e291a049b8d70becaef1581670f2d5da0763d2;hb=f3153710eaf2662f0c10f6c2265b2aa5b3a31390;hp=36fe269e28701a01b68e63acd236f1cbceb999ed;hpb=00d8c8d379391d7a47f09c343e4d72dfa53cd29b;p=chaz%2Fopenbox diff --git a/plugins/resistance.c b/plugins/resistance.c index 36fe269e..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 */ @@ -39,7 +43,7 @@ static void resist(Client *c, int *x, int *y) target = it->data; /* don't snap to self or non-visibles */ - if (target == c || !target->frame->visible) continue; + if (!target->frame->visible || target == c) continue; tl = target->frame->area.x - 1; tt = target->frame->area.y - 1; @@ -50,7 +54,6 @@ static void resist(Client *c, int *x, int *y) window edge available, without going all the way from bottom-to-top in the stacking list */ - g_print("r %d tl %d\n", r, tl); if (!snapx && cl >= tr && l < tr && l >= tr - resistance) *x = tr, snapx = TRUE; else if (!snapx && cr <= tl && r > tl && r <= tl + resistance)