make moveresize work with +/- as others
This commit is contained in:
parent
9dad2fd85c
commit
b4cc86abf0
14
client.c
14
client.c
|
@ -540,8 +540,8 @@ uicb_moveresize(Display *disp __attribute__ ((unused)),
|
||||||
awesome_config *awesomeconf,
|
awesome_config *awesomeconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
int x, y, w, h, nx, ny, nw, nh, ox, oy, ow, oh;
|
int nx, ny, nw, nh, ox, oy, ow, oh;
|
||||||
char xabs, yabs, wabs, habs;
|
char x[8], y[8], w[8], h[8];
|
||||||
int mx, my, dx, dy, nmx, nmy;
|
int mx, my, dx, dy, nmx, nmy;
|
||||||
unsigned int dui;
|
unsigned int dui;
|
||||||
Window dummy;
|
Window dummy;
|
||||||
|
@ -549,12 +549,12 @@ uicb_moveresize(Display *disp __attribute__ ((unused)),
|
||||||
if(!IS_ARRANGE(layout_floating))
|
if(!IS_ARRANGE(layout_floating))
|
||||||
if(!sel || !sel->isfloating || sel->isfixed || !arg)
|
if(!sel || !sel->isfloating || sel->isfixed || !arg)
|
||||||
return;
|
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;
|
return;
|
||||||
nx = xabs == 'x' ? sel->x + x : x;
|
nx = (int) compute_new_value_from_arg(x, sel->x);
|
||||||
ny = yabs == 'y' ? sel->y + y : y;
|
ny = (int) compute_new_value_from_arg(y, sel->y);
|
||||||
nw = wabs == 'w' ? sel->w + w : w;
|
nw = (int) compute_new_value_from_arg(w, sel->w);
|
||||||
nh = habs == 'h' ? sel->h + h : h;
|
nh = (int) compute_new_value_from_arg(h, sel->h);
|
||||||
|
|
||||||
ox = sel->x;
|
ox = sel->x;
|
||||||
oy = sel->y;
|
oy = sel->y;
|
||||||
|
|
Loading…
Reference in New Issue