[mutter/gnome-3-26] x11: Protect XChangeProperty call with error traps



commit 41f7a5fdf3bd95bd13e43e2151d29157d1dc5168
Author: polygamma <jonny westphalen googlemail com>
Date:   Mon Oct 9 16:14:13 2017 +0200

    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 files changed, 2 insertions(+), 0 deletions(-)
---
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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]