switch to get_current_tags() in client.c

This commit is contained in:
Julien Danjou 2007-12-27 13:22:40 +01:00
parent 7099794c64
commit f5f31d36d7
1 changed files with 10 additions and 2 deletions

View File

@ -377,6 +377,7 @@ client_resize(Client *c, int x, int y, int w, int h,
double dx, dy, max, min, ratio; double dx, dy, max, min, ratio;
XWindowChanges wc; XWindowChanges wc;
Area area; Area area;
Tag **curtags;
if(sizehints) if(sizehints)
{ {
@ -438,15 +439,17 @@ client_resize(Client *c, int x, int y, int w, int h,
c->y = wc.y = y; c->y = wc.y = y;
c->w = wc.width = w; c->w = wc.width = w;
c->h = wc.height = h; c->h = wc.height = h;
curtags = get_current_tags(c->screen);
if(!volatile_coords if(!volatile_coords
&& (c->isfloating && (c->isfloating
|| get_current_layout(c->screen)->arrange == layout_floating)) || curtags[0]->layout->arrange == layout_floating))
{ {
c->rx = c->x; c->rx = c->x;
c->ry = c->y; c->ry = c->y;
c->rw = c->w; c->rw = c->w;
c->rh = c->h; c->rh = c->h;
} }
p_delete(&curtags);
wc.border_width = c->border; wc.border_width = c->border;
XConfigureWindow(c->display, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); XConfigureWindow(c->display, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
window_configure(c->display, c->win, c->x, c->y, c->w, c->h, c->border); window_configure(c->display, c->win, c->x, c->y, c->w, c->h, c->border);
@ -738,10 +741,15 @@ uicb_client_moveresize(int screen, char *arg)
unsigned int dui; unsigned int dui;
Window dummy; Window dummy;
Client *sel = globalconf.focus->client; Client *sel = globalconf.focus->client;
Tag **curtags = get_current_tags(screen);
if(get_current_layout(screen)->arrange != layout_floating) if(curtags[0]->layout->arrange != layout_floating)
if(!sel || !sel->isfloating || sel->isfixed || !arg) if(!sel || !sel->isfloating || sel->isfixed || !arg)
{
p_delete(&curtags);
return; return;
}
p_delete(&curtags);
if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4) if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4)
return; return;
nx = (int) compute_new_value_from_arg(x, sel->x); nx = (int) compute_new_value_from_arg(x, sel->x);