summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2024-03-18 09:14:18 +0800
committerPo Lu <luangruo@yahoo.com>2024-03-18 09:14:18 +0800
commit1a8b34a503e5af32851c1aac27a3f09e2345673b (patch)
treec3830bf4c15d1e2e1823f45e68b5acd5244b6240 /src
parent8d4a8b7dfd0905defac172cc58c2252dc1b39ad7 (diff)
downloademacs-1a8b34a503e5af32851c1aac27a3f09e2345673b.tar.gz
Makeshift solution for X server bug
* src/xterm.c (x_sync_init_fences): Detect errors around XSyncCreateFence. (bug#69762)
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index c30015ec8f0..b30a2485148 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7292,6 +7292,11 @@ x_sync_init_fences (struct frame *f)
&& dpyinfo->xsync_minor < 1))
return;
+ /* Suppress errors around XSyncCreateFence requests, since its
+ implementations on certain X servers erroneously reject valid
+ drawables, such as the frame's inner window. (bug#69762) */
+
+ x_catch_errors (dpyinfo->display);
output->sync_fences[0]
= XSyncCreateFence (FRAME_X_DISPLAY (f),
/* The drawable given below is only used to
@@ -7303,6 +7308,9 @@ x_sync_init_fences (struct frame *f)
= XSyncCreateFence (FRAME_X_DISPLAY (f),
FRAME_X_WINDOW (f),
False);
+ if (x_had_errors_p (dpyinfo->display))
+ output->sync_fences[1] = output->sync_fences[0] = None;
+ x_uncatch_errors_after_check ();
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
dpyinfo->Xatom_net_wm_sync_fences, XA_CARDINAL,