switch to get_current_tags() in mouse.c

This commit is contained in:
Julien Danjou 2007-12-27 12:50:55 +01:00
parent a48cefe53e
commit 7196ee7102
1 changed files with 11 additions and 5 deletions

10
mouse.c
View File

@ -44,16 +44,19 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
XEvent ev;
Area area;
Client *c = globalconf.focus->client;
Tag **curtags = get_current_tags(screen);
if(!c)
return;
if((get_current_layout(screen)->arrange != layout_floating)
if((curtags[0]->layout->arrange != layout_floating)
&& !c->isfloating)
uicb_client_togglefloating(screen, NULL);
else
restack(screen);
p_delete(&curtags);
area = get_screen_area(c->screen,
globalconf.screens[screen].statusbar,
&globalconf.screens[screen].padding);
@ -114,16 +117,19 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
int ocx, ocy, nw, nh;
XEvent ev;
Client *c = globalconf.focus->client;
Tag **curtags = get_current_tags(screen);
if(!c)
return;
if((get_current_layout(screen)->arrange != layout_floating)
if((curtags[0]->layout->arrange != layout_floating)
&& !c->isfloating)
uicb_client_togglefloating(screen, NULL);
else
restack(screen);
p_delete(&curtags);
ocx = c->x;
ocy = c->y;
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen),