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

16
mouse.c
View File

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