apply hints before initial mapping (ICCCM)
authorIngo Lohmar <ingo.lohmar@posteo.net>
Fri, 31 May 2019 20:25:35 +0000 (22:25 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 26 Oct 2019 09:47:24 +0000 (11:47 +0200)
For WM_CLASS this is mentioned in the ICCCM docs
https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5
(third sentence).

When changing the WM_CLASS from the command line, this is necessary for
window managers to pick it up before applying class-based rules.

x.c

diff --git a/x.c b/x.c
index 6406925..bc3ad5a 100644 (file)
--- a/x.c
+++ b/x.c
@@ -1154,8 +1154,8 @@ xinit(int cols, int rows)
 
        win.mode = MODE_NUMLOCK;
        resettitle();
-       XMapWindow(xw.dpy, xw.win);
        xhints();
+       XMapWindow(xw.dpy, xw.win);
        XSync(xw.dpy, False);
 
        clock_gettime(CLOCK_MONOTONIC, &xsel.tclick1);