diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2015-01-23 19:35:12 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2015-01-23 19:35:12 +0000 |
commit | 644dc89207d0f9a0d08060f7357c646ad4c5467d (patch) | |
tree | 426f4268c9a4f90d22b5675edcfd4e884f3338b7 /app | |
parent | 0c730e4a673c72964e2d307b136fa9c80c26b2fe (diff) |
First restore net_wm_state(ewmh), then wm_state(iccc); prevents clients
from re-hiding on restart due to flag toggling (note that this is ripe
for re-vamping). Behavior only observed on restarts.
Problem found by, and initial patch from, Henri Kemppainen (thanks!),
though ever so slightly different one applied.
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/client.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c index 1dc61f821..6858f50dc 100644 --- a/app/cwm/client.c +++ b/app/cwm/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.189 2015/01/19 14:54:16 okan Exp $ + * $OpenBSD: client.c,v 1.190 2015/01/23 19:35:11 okan Exp $ */ #include <sys/types.h> @@ -63,7 +63,6 @@ client_init(Window win, struct screen_ctx *sc) { struct client_ctx *cc; XWindowAttributes wattr; - long state; int mapped; if (win == None) @@ -125,16 +124,16 @@ client_init(Window win, struct screen_ctx *sc) /* Notify client of its configuration. */ client_config(cc); - if ((state = client_get_wm_state(cc)) < 0) - state = NormalState; - - (state == IconicState) ? client_hide(cc) : client_unhide(cc); - TAILQ_INSERT_TAIL(&sc->clientq, cc, entry); xu_ewmh_net_client_list(sc); xu_ewmh_restore_net_wm_state(cc); + if (client_get_wm_state(cc) == IconicState) + client_hide(cc); + else + client_unhide(cc); + if (mapped) group_autogroup(cc); |