From 56d273ee48fffc7fed67ec7b22afd8e4b1c23c6e Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 25 Dec 2020 18:39:52 +0100 Subject: [PATCH] compositor: Ignore XError when changing background picture If xfwm4 is compiled with support for the root pixmap in the compositor, changing the background image may cause an XError if the external pixmap is already freed. Guard against such XError. Signed-off-by: Olivier Fourdan Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/476 --- src/compositor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 9c5ceb454..8ff0dad42 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3774,8 +3774,11 @@ compositorHandlePropertyNotify (DisplayInfo *display_info, XPropertyEvent *ev) ScreenInfo *screen_info = myDisplayGetScreenFromRoot (display_info, ev->window); if ((screen_info) && (screen_info->compositor_active) && (screen_info->rootTile)) { + myDisplayErrorTrapPush (display_info); XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE); XRenderFreePicture (display_info->dpy, screen_info->rootTile); + myDisplayErrorTrapPopIgnored (display_info); + screen_info->rootTile = None; damage_screen (screen_info); -- 2.29.2