Client: Check if previous focus client was max to raise next

This commit is contained in:
Martin Duquesnoy 2011-06-09 19:42:40 +02:00
parent 96b1c0dff2
commit 87f926253f

View File

@ -246,6 +246,7 @@ client_above(Client *c)
void
client_focus(Client *c)
{
Bool prevwasmax;
Client *cc;
if(sel && sel != c)
@ -253,6 +254,9 @@ client_focus(Client *c)
if(sel->flags & AboveFlag)
sel->flags &= ~AboveFlag;
if(sel->flags & MaxFlag)
prevwasmax = True;
XChangeProperty(dpy, sel->frame, net_atom[net_wm_window_opacity], XA_CARDINAL,
32, PropModeReplace, (uchar *)&conf.opacity, 1);
@ -277,7 +281,7 @@ client_focus(Client *c)
frame_update(c);
mouse_grabbuttons(c, True);
if(conf.raisefocus || c->flags & MaxFlag)
if(conf.raisefocus || c->flags & MaxFlag || prevwasmax)
{
client_raise(c);
tags[c->screen][c->tag].flags |= IgnoreEnterFlag;