From 7094d7a9065cde5cc01b8ff193e8ee6a464bf9f3 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 29 Jul 2024 22:38:24 +0100 Subject: [PATCH] win: check override redirect windows in win_on_client_update If a window doesn't have a client window, we still want to check the window itself for properties. Signed-off-by: Yuxuan Shui --- src/wm/win.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wm/win.c b/src/wm/win.c index bcedd333c7..ca309327d1 100644 --- a/src/wm/win.c +++ b/src/wm/win.c @@ -1290,8 +1290,6 @@ bool win_update_wintype(struct x_connection *c, struct atom *atoms, struct win * * @param w struct _win of the parent window */ void win_on_client_update(session_t *ps, struct win *w) { - auto client_win = wm_ref_client_of(w->tree_ref); - // If the window isn't mapped yet, stop here, as the function will be // called in map_win() if (w->a.map_state != XCB_MAP_STATE_VIEWABLE) { @@ -1300,7 +1298,7 @@ void win_on_client_update(session_t *ps, struct win *w) { win_update_wintype(&ps->c, ps->atoms, w); - xcb_window_t client_win_id = client_win ? wm_ref_win_id(client_win) : XCB_NONE; + xcb_window_t client_win_id = win_client_id(w, /*fallback_to_self=*/true); // Get frame widths. The window is in damaged area already. win_update_frame_extents(&ps->c, ps->atoms, w, client_win_id, ps->o.frame_opacity);