summaryrefslogtreecommitdiff
path: root/plugins/resistance
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-06-27 04:20:30 +0000
committerDana Jansens <danakj@orodu.net>2003-06-27 04:20:30 +0000
commit34e819738b344a992a1dbfd6cdd165e0c8ddb3a9 (patch)
tree479e77d920b6f595e92955dfcbb8fd0b63720ad1 /plugins/resistance
parentd0abbec2e522119c0865f668b094c60a1712e24f (diff)
xinerama support
Diffstat (limited to 'plugins/resistance')
-rw-r--r--plugins/resistance/resistance.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/resistance/resistance.c b/plugins/resistance/resistance.c
index 91c10c0e..8d493637 100644
--- a/plugins/resistance/resistance.c
+++ b/plugins/resistance/resistance.c
@@ -32,6 +32,7 @@ static void resist_move(Client *c, int *x, int *y)
{
GList *it;
Rect *area;
+ guint i;
int l, t, r, b; /* requested edges */
int al, at, ar, ab; /* screen area edges */
int cl, ct, cr, cb; /* current edges */
@@ -107,7 +108,8 @@ static void resist_move(Client *c, int *x, int *y)
}
/* get the screen boundaries */
- area = screen_area(c->desktop);
+ area = screen_area_xinerama(c->desktop, client_xinerama_area(c));
+
al = area->x;
at = area->y;
ar = al + area->width - 1;
@@ -117,7 +119,7 @@ static void resist_move(Client *c, int *x, int *y)
if (cl >= al && l < al && l >= al - resistance)
*x = al;
else if (cr <= ar && r > ar && r <= ar + resistance)
- *x = ar - w + 1;
+ *x = ar - w + 1;
if (ct >= at && t < at && t >= at - resistance)
*y = at;
else if (cb <= ab && b > ab && b < ab + resistance)