x: rewrite x_is_root_back_pixmap_atom using root back pixmap atoms

This commit is contained in:
Maxim Solovyov 2023-06-18 15:32:15 +03:00
parent fea1dc794c
commit cbd2d4125c
No known key found for this signature in database
1 changed files with 2 additions and 7 deletions

View File

@ -656,13 +656,8 @@ x_get_root_back_pixmap(xcb_connection_t *c, xcb_window_t root, struct atom *atom
}
bool x_is_root_back_pixmap_atom(struct atom *atoms, xcb_atom_t atom) {
for (int p = 0; background_props_str[p]; p++) {
xcb_atom_t prop_atom = get_atom(atoms, background_props_str[p]);
if (prop_atom == atom) {
return true;
}
}
return false;
return atom == atoms->a_XROOTPMAP_ID || atom == atoms->aESETROOT_PMAP_ID ||
atom == atoms->a_XSETROOT_ID;
}
/**