From 7196ee71020a90c701f4ea1ae60e624bba8b6b74 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Dec 2007 12:50:55 +0100 Subject: [PATCH] switch to get_current_tags() in mouse.c --- mouse.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/mouse.c b/mouse.c index b628f252f..3a3e8e89f 100644 --- a/mouse.c +++ b/mouse.c @@ -44,15 +44,18 @@ 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); + uicb_client_togglefloating(screen, NULL); + else + restack(screen); + + p_delete(&curtags); area = get_screen_area(c->screen, globalconf.screens[screen].statusbar, @@ -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),