atom: remove an unnecessary use of get_atom

Replace get_atom("COMPTON_VERSION") with a fixed atom.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-02-15 20:11:42 +00:00
parent 0dcca2228e
commit 071b77c49f
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
2 changed files with 5 additions and 5 deletions

View File

@ -23,6 +23,7 @@
WM_CLIENT_MACHINE, \
_NET_ACTIVE_WINDOW, \
_COMPTON_SHADOW, \
COMPTON_VERSION, \
_NET_WM_WINDOW_TYPE, \
_XROOTPMAP_ID, \
ESETROOT_PMAP_ID, \

View File

@ -1327,10 +1327,9 @@ static int register_cm(session_t *ps) {
}
// Set COMPTON_VERSION
e = xcb_request_check(
ps->c.c, xcb_change_property_checked(
e = xcb_request_check(ps->c.c, xcb_change_property_checked(
ps->c.c, XCB_PROP_MODE_REPLACE, ps->reg_win,
get_atom(ps->atoms, "COMPTON_VERSION"), XCB_ATOM_STRING, 8,
ps->atoms->aCOMPTON_VERSION, XCB_ATOM_STRING, 8,
(uint32_t)strlen(PICOM_VERSION), PICOM_VERSION));
if (e) {
log_error_x_error(e, "Failed to set COMPTON_VERSION.");