diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2021-03-22 15:34:31 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2021-03-22 15:38:58 +0100 |
commit | 80ba38a0b365f65104e481f17047bf5f343b0980 (patch) | |
tree | 1926f785df4bd77dd05f3bc3f44223c6ae87ad43 | |
parent | 5d3af346dd8b2c46b0cfd7e6eca66232bc102bfa (diff) | |
download | gtk+-80ba38a0b365f65104e481f17047bf5f343b0980.tar.gz |
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
-rw-r--r-- | gdk/x11/gdkdrag-x11.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |