fix stacking issues
This commit is contained in:
parent
68affe21fd
commit
a84eae2700
34
client.c
34
client.c
|
@ -201,7 +201,24 @@ client_focus(Client *c, int screen, Bool raise)
|
||||||
globalconf.screens[screen].colors_selected[ColBorder].pixel);
|
globalconf.screens[screen].colors_selected[ColBorder].pixel);
|
||||||
XSetInputFocus(globalconf.display, c->win, RevertToPointerRoot, CurrentTime);
|
XSetInputFocus(globalconf.display, c->win, RevertToPointerRoot, CurrentTime);
|
||||||
if(raise)
|
if(raise)
|
||||||
XRaiseWindow(globalconf.display, c->win);
|
{
|
||||||
|
XWindowChanges wc;
|
||||||
|
Layout *curlay = layout_get_current(screen);
|
||||||
|
if(c->isfloating || curlay->arrange == layout_floating)
|
||||||
|
XRaiseWindow(globalconf.display, c->win);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Client *client;
|
||||||
|
wc.stack_mode = Below;
|
||||||
|
wc.sibling = c->win;
|
||||||
|
for(client = globalconf.clients; client; client = client->next)
|
||||||
|
if(client != c && IS_TILED(client, c->screen))
|
||||||
|
{
|
||||||
|
XConfigureWindow(globalconf.display, client->win, CWSibling | CWStackMode, &wc);
|
||||||
|
wc.sibling = client->win;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/* since we're dropping EnterWindow events and sometimes the window
|
/* since we're dropping EnterWindow events and sometimes the window
|
||||||
* will appear under the mouse, grabbuttons */
|
* will appear under the mouse, grabbuttons */
|
||||||
window_grabbuttons(phys_screen, c->win);
|
window_grabbuttons(phys_screen, c->win);
|
||||||
|
@ -530,11 +547,18 @@ client_setfloating(Client *c, Bool floating)
|
||||||
if(c->isfloating != floating)
|
if(c->isfloating != floating)
|
||||||
{
|
{
|
||||||
if((c->isfloating = floating))
|
if((c->isfloating = floating))
|
||||||
client_resize(c, c->f_geometry, False);
|
|
||||||
else if(c->ismax)
|
|
||||||
{
|
{
|
||||||
c->ismax = False;
|
client_resize(c, c->f_geometry, False);
|
||||||
client_resize(c, c->m_geometry, False);
|
XRaiseWindow(globalconf.display, c->win);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XLowerWindow(globalconf.display, c->win);
|
||||||
|
if(c->ismax)
|
||||||
|
{
|
||||||
|
c->ismax = False;
|
||||||
|
client_resize(c, c->m_geometry, False);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(client_isvisible(c, c->screen))
|
if(client_isvisible(c, c->screen))
|
||||||
globalconf.screens[c->screen].need_arrange = True;
|
globalconf.screens[c->screen].need_arrange = True;
|
||||||
|
|
5
mouse.c
5
mouse.c
|
@ -54,9 +54,6 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
if(!c)
|
if(!c)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* go above everybody */
|
|
||||||
XMapRaised(globalconf.display, c->win);
|
|
||||||
|
|
||||||
area = screen_get_area(c->screen,
|
area = screen_get_area(c->screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
&globalconf.screens[screen].padding);
|
&globalconf.screens[screen].padding);
|
||||||
|
@ -127,7 +124,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
layout_refresh();
|
layout_refresh();
|
||||||
}
|
}
|
||||||
if((target = client_get_bywin(globalconf.clients, child))
|
if((target = client_get_bywin(globalconf.clients, child))
|
||||||
&& target != c)
|
&& target != c && !target->isfloating)
|
||||||
{
|
{
|
||||||
client_list_swap(&globalconf.clients, c, target);
|
client_list_swap(&globalconf.clients, c, target);
|
||||||
globalconf.screens[c->screen].need_arrange = True;
|
globalconf.screens[c->screen].need_arrange = True;
|
||||||
|
|
Loading…
Reference in New Issue