readd some code to check where the mouse is on tag switching
This commit is contained in:
parent
1b4a1e7c9e
commit
2ad8e005ad
10
layout.c
10
layout.c
|
@ -56,6 +56,9 @@ arrange(int screen)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Layout *curlay = get_current_layout(screen);
|
Layout *curlay = get_current_layout(screen);
|
||||||
|
unsigned int dui;
|
||||||
|
int di, x, y;
|
||||||
|
Window rootwin, childwin;
|
||||||
|
|
||||||
for(c = globalconf.clients; c; c = c->next)
|
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)
|
if((c = focus_get_current_client(screen)) && !globalconf.focus->client)
|
||||||
client_focus(c, screen, False);
|
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 */
|
/* reset status */
|
||||||
globalconf.screens[screen].need_arrange = False;
|
globalconf.screens[screen].need_arrange = False;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue