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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-09-23 21:05:13 +01:00
parent 73ea5d2bfb
commit 1a1540a5a6
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 2 additions and 5 deletions

View File

@ -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;
}
}
}