tSet override_redirect bit to non NORMAL EMWH windows - glazier - window management experiments
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 66f4ae619cd318e730f1bee75a549195751923b0
(DIR) parent 7c536c33fc7e7f0e3a327e23d584171fe5138020
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Tue, 9 Jun 2020 18:45:54 +0200
Set override_redirect bit to non NORMAL EMWH windows
Doing this ensure that the WM won't focus them when EWMH clients rely
on _NET_WM_WINDOW_TYPE only to instruct the WM to treat them differently,
like pop-up window or dock.
Diffstat:
M ewmh.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/ewmh.c b/ewmh.c
t@@ -180,9 +180,14 @@ ewmh_clientlist()
l = calloc(n, sizeof(*w));
- for (i=0, c=0; i<n; i++)
- if (!wm_is_ignored(w[i]) && ewmh_type(w[i]) == NORMAL)
+ for (i=0, c=0; i<n; i++) {
+ if (ewmh_type(w[i]) != NORMAL) {
+ xcb_change_window_attributes(conn, w[i], XCB_CW_OVERRIDE_REDIRECT, &(int[]){1});
+ xcb_flush(conn);
+ }
+ if (!wm_is_ignored(w[i]))
l[c++] = w[i];
+ }
free(w);