summaryrefslogtreecommitdiff
path: root/source/xfce/xfwm4/0001-compositor-Ignore-XError-when-changing-background-pi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/xfce/xfwm4/0001-compositor-Ignore-XError-when-changing-background-pi.patch')
-rw-r--r--source/xfce/xfwm4/0001-compositor-Ignore-XError-when-changing-background-pi.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/xfce/xfwm4/0001-compositor-Ignore-XError-when-changing-background-pi.patch b/source/xfce/xfwm4/0001-compositor-Ignore-XError-when-changing-background-pi.patch
new file mode 100644
index 00000000..200432b3
--- /dev/null
+++ b/source/xfce/xfwm4/0001-compositor-Ignore-XError-when-changing-background-pi.patch
@@ -0,0 +1,36 @@
+From 56d273ee48fffc7fed67ec7b22afd8e4b1c23c6e Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <fourdan@xfce.org>
+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 <fourdan@xfce.org>
+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
+