From b4cc86abf00e40f4a89bbaf46182396e4c17d335 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Sep 2007 12:30:18 +0200 Subject: [PATCH] make moveresize work with +/- as others --- client.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client.c b/client.c index 044dce9fb..f2f2ad033 100644 --- a/client.c +++ b/client.c @@ -540,8 +540,8 @@ uicb_moveresize(Display *disp __attribute__ ((unused)), awesome_config *awesomeconf, const char *arg) { - int x, y, w, h, nx, ny, nw, nh, ox, oy, ow, oh; - char xabs, yabs, wabs, habs; + int nx, ny, nw, nh, ox, oy, ow, oh; + char x[8], y[8], w[8], h[8]; int mx, my, dx, dy, nmx, nmy; unsigned int dui; Window dummy; @@ -549,12 +549,12 @@ uicb_moveresize(Display *disp __attribute__ ((unused)), if(!IS_ARRANGE(layout_floating)) if(!sel || !sel->isfloating || sel->isfixed || !arg) return; - if(sscanf(arg, "%d%c %d%c %d%c %d%c", &x, &xabs, &y, &yabs, &w, &wabs, &h, &habs) != 8) + if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4) return; - nx = xabs == 'x' ? sel->x + x : x; - ny = yabs == 'y' ? sel->y + y : y; - nw = wabs == 'w' ? sel->w + w : w; - nh = habs == 'h' ? sel->h + h : h; + nx = (int) compute_new_value_from_arg(x, sel->x); + ny = (int) compute_new_value_from_arg(y, sel->y); + nw = (int) compute_new_value_from_arg(w, sel->w); + nh = (int) compute_new_value_from_arg(h, sel->h); ox = sel->x; oy = sel->y;