X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fresistance.c;h=24e291a049b8d70becaef1581670f2d5da0763d2;hb=8fff73fa7a85c5744955befaf28c754673924afe;hp=c7f47c3e07bdec1c907fa0d7dd052805109982e6;hpb=921a711daddffc649738f14b10f7eb703df946bc;p=chaz%2Fopenbox diff --git a/plugins/resistance.c b/plugins/resistance.c index c7f47c3e..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,8 +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; - if (target == c) continue; /* don't snap to self */ - if (!target->visible) continue; /* don't snap to non-visibles */ + /* 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; @@ -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)