From ef6ed1fb08dc6c777bab63faccb4334e0064b6e9 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan <fourdan@xfce.org> Date: Sat, 8 Aug 2020 18:25:14 +0200 Subject: [PATCH] compositor: use actual atom The function compositorCheckCMSelection() would use the atom index in our table of atoms, instead of the actual atom, so this is unlikely to work as expected. Fix the code to use the appropriate atom as it should. Signed-off-by: Olivier Fourdan <fourdan@xfce.org> (cherry picked from commit 78c5dc4264ec8cfa7bab59a39f193788bdcf4059) --- src/compositor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 917774075..ad8f280d4 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3770,8 +3770,7 @@ compositorCheckCMSelection (ScreenInfo *screen_info) } /* Older property "COMPOSITING_MANAGER" */ - a = XInternAtom (display_info->dpy, COMPOSITING_MANAGER, FALSE); - if (XGetSelectionOwner (display_info->dpy, a) != None) + if (XGetSelectionOwner (display_info->dpy, display_info->atoms[COMPOSITING_MANAGER]) != None) { return TRUE; } -- GitLab