1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

win: fix getting wintype atoms

They are not guaranteed to be in the cache, use normal get_atom instead.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-02-19 21:51:07 +00:00
parent 0551d63b5f
commit 23455296fa
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -757,7 +757,7 @@ wid_get_prop_wintype(struct x_connection *c, struct atom *atoms, xcb_window_t wi
for (unsigned i = 0; i < prop.nitems; ++i) {
for (wintype_t j = 1; j < NUM_WINTYPES; ++j) {
if (get_atom_cached(atoms, WINTYPES[j], strlen(WINTYPES[j])) ==
if (get_atom_with_nul(atoms, WINTYPES[j], c->c) ==
(xcb_atom_t)prop.p32[i]) {
free_winprop(&prop);
return j;