From 1a1540a5a6fa4fbd348d5c8906c26ba6f0ee981d Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 23 Sep 2019 21:05:13 +0100 Subject: [PATCH] events: don't call win_get_name for logging win_get_name _updates_ the name of the window by querying the X server, thus potentially changes the behaviour of the compositor when logging is turned on (e.g. we could fail to detect window name changes, because the name was blindly updated in a logging call without handling the name change). We shouldn't do that. Signed-off-by: Yuxuan Shui --- src/event.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/event.c b/src/event.c index 873d39d..450d7c1 100644 --- a/src/event.c +++ b/src/event.c @@ -65,11 +65,8 @@ static inline const char *ev_window_name(session_t *ps, xcb_window_t wid) { w = find_toplevel(ps, wid); } - if (w) { - win_get_name(ps, w); - if (w->name) { - name = w->name; - } + if (w && w->name) { + name = w->name; } } }