mutter/mutter-x11-Protect-XChangeProperty-call.patch

35 lines
1.1 KiB
Diff

From 41f7a5fdf3bd95bd13e43e2151d29157d1dc5168 Mon Sep 17 00:00:00 2001
From: polygamma <jonny.westphalen@googlemail.com>
Date: Mon, 9 Oct 2017 16:14:13 +0200
Subject: x11: Protect XChangeProperty call with error traps
They may happen around the time a window is destroyed, thus could result
on BadWindow X errors.
https://bugzilla.gnome.org/show_bug.cgi?id=788666
---
src/x11/window-x11.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 36a5e70..4885f5f 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -920,11 +920,13 @@ update_gtk_edge_constraints (MetaWindow *window)
meta_verbose ("Setting _GTK_EDGE_CONSTRAINTS to %lu\n", data[0]);
+ meta_error_trap_push (window->display);
XChangeProperty (window->display->xdisplay,
window->xwindow,
window->display->atom__GTK_EDGE_CONSTRAINTS,
XA_CARDINAL, 32, PropModeReplace,
(guchar*) data, 1);
+ meta_error_trap_pop (window->display);
}
static gboolean
--
cgit v0.12