From 87f926253fefe4b200f7ad9115a0db44f2c4846f Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 9 Jun 2011 19:42:40 +0200 Subject: [PATCH] Client: Check if previous focus client was max to raise next --- src/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index 269de02..dd89884 100644 --- a/src/client.c +++ b/src/client.c @@ -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;