1
0
Fork 0

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
This commit is contained in:
polygamma 2017-10-09 16:14:13 +02:00 committed by Carlos Garnacho
parent 64cb735abf
commit f9c625924e

View file

@ -920,11 +920,13 @@ update_gtk_edge_constraints (MetaWindow *window)
meta_verbose ("Setting _GTK_EDGE_CONSTRAINTS to %lu\n", data[0]); meta_verbose ("Setting _GTK_EDGE_CONSTRAINTS to %lu\n", data[0]);
meta_error_trap_push (window->display);
XChangeProperty (window->display->xdisplay, XChangeProperty (window->display->xdisplay,
window->xwindow, window->xwindow,
window->display->atom__GTK_EDGE_CONSTRAINTS, window->display->atom__GTK_EDGE_CONSTRAINTS,
XA_CARDINAL, 32, PropModeReplace, XA_CARDINAL, 32, PropModeReplace,
(guchar*) data, 1); (guchar*) data, 1);
meta_error_trap_pop (window->display);
} }
static gboolean static gboolean