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
1 changed files with 1 additions and 1 deletions

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;