mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
x: rewrite x_is_root_back_pixmap_atom using root back pixmap atoms
This commit is contained in:
parent
fea1dc794c
commit
cbd2d4125c
1 changed files with 2 additions and 7 deletions
9
src/x.c
9
src/x.c
|
@ -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) {
|
bool x_is_root_back_pixmap_atom(struct atom *atoms, xcb_atom_t atom) {
|
||||||
for (int p = 0; background_props_str[p]; p++) {
|
return atom == atoms->a_XROOTPMAP_ID || atom == atoms->aESETROOT_PMAP_ID ||
|
||||||
xcb_atom_t prop_atom = get_atom(atoms, background_props_str[p]);
|
atom == atoms->a_XSETROOT_ID;
|
||||||
if (prop_atom == atom) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue