[gtk: 1/2] x11/dnd: Ignore XErrors from the COW
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] x11/dnd: Ignore XErrors from the COW
- Date: Mon, 22 Mar 2021 15:09:43 +0000 (UTC)
commit 80ba38a0b365f65104e481f17047bf5f343b0980
Author: Olivier Fourdan <ofourdan redhat com>
Date: Mon Mar 22 15:34:31 2021 +0100
x11/dnd: Ignore XErrors from the COW
The DnD code for X11 adds the composite overlay window (aka COW) to the
cache.
Yet the X11 requests to get and release the COW may trigger XErrors that
we ought to ignore otherwise the client will abort.
Fixes: #3715
gdk/x11/gdkdrag-x11.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index d8c9ac28b8..d82d3a7d4b 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -581,12 +581,14 @@ gdk_surface_cache_new (GdkDisplay *display)
*/
if (gdk_display_is_composited (display))
{
+ gdk_x11_display_error_trap_push (display);
cow = XCompositeGetOverlayWindow (xdisplay, xroot_window);
gdk_surface_cache_add (result, cow, 0, 0,
WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen),
HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen),
TRUE);
XCompositeReleaseOverlayWindow (xdisplay, xroot_window);
+ gdk_x11_display_error_trap_pop_ignored (display);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]