From bafa6f74e4a8112b650cb1aa2894bc5c0184fca5 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Wed, 20 Jun 2012 05:56:07 +0000 Subject: [PATCH] Fix showing struts --- sys-x11.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys-x11.c b/sys-x11.c index adb4eae..0d7644b 100644 --- a/sys-x11.c +++ b/sys-x11.c @@ -438,6 +438,7 @@ static void process_event(int type, XEvent *xe, win_t *root) printf("map_req: %d\n", type); if ((win = win_find(dpy,xe->xmaprequest.window,1)) && win->state == ST_HIDE) { + win->state = ST_SHOW; if (win_prop(win, NET_STATE) == atoms[NET_FULL]) win->state = ST_FULL; XSelectInput(win->sys->dpy, win->sys->xid, PropertyChangeMask); @@ -445,8 +446,8 @@ static void process_event(int type, XEvent *xe, win_t *root) wm_insert(win); else wm_update(); - } else - sys_show(win, ST_SHOW); + } + sys_show(win, win->state); } else if (type == ClientMessage) { XClientMessageEvent *cme = &xe->xclient; -- 2.43.2