aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2020-11-29 20:38:24 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2020-11-29 20:38:24 +0000
commit92189228ad5c54eb88bb29f49c8b2fce37d4baa1 (patch)
treee5011338a7c6060d19fc36f12a9f749fac6341f1
parent1c616e690464071ca801bc245b506061a0c48467 (diff)
downloadports-92189228ad5c54eb88bb29f49c8b2fce37d4baa1.tar.gz
ports-92189228ad5c54eb88bb29f49c8b2fce37d4baa1.zip
MFH: r556577
Import xfce4-wm upstream patches which fix crashes at runtime. Obtained from: https://gitlab.xfce.org/xfce/xfwm4/-/issues/460 Approved by: ports-secteam (joneum)
Notes
Notes: svn path=/branches/2020Q4/; revision=556600
-rw-r--r--x11-wm/xfce4-wm/Makefile2
-rw-r--r--x11-wm/xfce4-wm/files/patch-XFixes-XError44
-rw-r--r--x11-wm/xfce4-wm/files/patch-Xsync-XError30
3 files changed, 75 insertions, 1 deletions
diff --git a/x11-wm/xfce4-wm/Makefile b/x11-wm/xfce4-wm/Makefile
index abe9dde88021..7437922a6a45 100644
--- a/x11-wm/xfce4-wm/Makefile
+++ b/x11-wm/xfce4-wm/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xfce4-wm
PORTVERSION= 4.14.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-wm xfce
MASTER_SITES= XFCE
DISTNAME= xfwm4-${DISTVERSIONFULL}
diff --git a/x11-wm/xfce4-wm/files/patch-XFixes-XError b/x11-wm/xfce4-wm/files/patch-XFixes-XError
new file mode 100644
index 000000000000..7583e5c63462
--- /dev/null
+++ b/x11-wm/xfce4-wm/files/patch-XFixes-XError
@@ -0,0 +1,44 @@
+From c255a406bd353a24a9143b152f91e5eb39f69f1f Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <fourdan@xfce.org>
+Date: Sat, 28 Nov 2020 21:16:20 +0100
+Subject: [PATCH] compositor: Handle XFixes XError
+
+XFixesSetPictureClipRegion() with the region from the client window can
+cause a RenderBadPicture error.
+
+Make sure to include it within the XError trap.
+
+Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
+https://gitlab.xfce.org/xfce/xfwm4/-/issues/460
+---
+ src/compositor.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/compositor.c b/src/compositor.c
+index 5110f29c2..25baaabe5 100644
+--- src/compositor.c
++++ src/compositor.c
+@@ -781,15 +781,16 @@ border_size (CWindow *cw)
+ myDisplayErrorTrapPush (display_info);
+ border = XFixesCreateRegionFromWindow (display_info->dpy,
+ cw->id, WindowRegionBounding);
+- if ((myDisplayErrorTrapPop (display_info) != Success) || (border == None))
+- {
+- return None;
+- }
+ XFixesSetPictureClipRegion (display_info->dpy, cw->picture, 0, 0, border);
+ XFixesTranslateRegion (display_info->dpy, border,
+ cw->attr.x + cw->attr.border_width,
+ cw->attr.y + cw->attr.border_width);
+
++ if (myDisplayErrorTrapPop (display_info) != Success)
++ {
++ return None;
++ }
++
+ return border;
+ }
+
+--
+GitLab
+
diff --git a/x11-wm/xfce4-wm/files/patch-Xsync-XError b/x11-wm/xfce4-wm/files/patch-Xsync-XError
new file mode 100644
index 000000000000..61b5aa5c6d2c
--- /dev/null
+++ b/x11-wm/xfce4-wm/files/patch-Xsync-XError
@@ -0,0 +1,30 @@
+From 6b3c1ef155a01b61443b832b1922b560ef42ce24 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <fourdan@xfce.org>
+Date: Sat, 21 Nov 2020 14:05:04 +0100
+Subject: [PATCH] xsync: Handle XError
+
+XSync can fail, handle the XError gracefully.
+
+Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
+Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/448
+---
+ src/xsync.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/xsync.c b/src/xsync.c
+index 920dfdc17..e1c379f9d 100644
+--- src/xsync.c
++++ src/xsync.c
+@@ -113,7 +113,9 @@ clientDestroyXSyncAlarm (Client *c)
+ screen_info = c->screen_info;
+ display_info = screen_info->display_info;
+
++ myDisplayErrorTrapPush (display_info);
+ XSyncDestroyAlarm (display_info->dpy, c->xsync_alarm);
++ myDisplayErrorTrapPopIgnored (display_info);
+ c->xsync_alarm = None;
+ }
+ }
+--
+GitLab
+