From 2ad8e005ad67ddf61a220dd7f9a53bcdc66bb3c7 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 4 Feb 2008 14:16:14 +0100 Subject: [PATCH] readd some code to check where the mouse is on tag switching --- layout.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/layout.c b/layout.c index 8cdc0e3c..ad1578d8 100644 --- a/layout.c +++ b/layout.c @@ -56,6 +56,9 @@ arrange(int screen) { Client *c; Layout *curlay = get_current_layout(screen); + unsigned int dui; + int di, x, y; + Window rootwin, childwin; for(c = globalconf.clients; c; c = c->next) { @@ -84,6 +87,13 @@ arrange(int screen) if((c = focus_get_current_client(screen)) && !globalconf.focus->client) client_focus(c, screen, False); + /* check that the mouse is on a window or not */ + if(XQueryPointer(globalconf.display, RootWindow(globalconf.display, + get_phys_screen(screen)), + &rootwin, &childwin, &x, &y, &di, &di, &dui) + && (rootwin == None || childwin == None || childwin == rootwin)) + window_root_grabbuttons(screen); + /* reset status */ globalconf.screens[screen].need_arrange = False; }