From: Po Lu Date: Mon, 18 Apr 2022 08:08:19 +0000 (+0800) Subject: Stop skipping ShapeNotify events during DND on GTK+ X-Git-Tag: emacs-29.0.90~1931^2~436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=736fd8b258e5bbddf3e5260db1692d3e9ca4c81c;p=emacs.git Stop skipping ShapeNotify events during DND on GTK+ * src/xterm.c (handle_one_xevent): Don't skip ShapeNotify events because we can't send these events back to GDK manually. --- diff --git a/src/xterm.c b/src/xterm.c index ef00e027f8e..99269e3e92b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -18661,7 +18661,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, && x_dnd_in_progress && x_dnd_use_toplevels && dpyinfo == FRAME_DISPLAY_INFO (x_dnd_frame)) { +#ifndef USE_GTK XEvent xevent; +#endif XShapeEvent *xse = (XShapeEvent *) event; #if defined HAVE_XCB_SHAPE && defined HAVE_XCB_SHAPE_INPUT_RECTS xcb_shape_get_rectangles_cookie_t bounding_rect_cookie; @@ -18678,6 +18680,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, int rc, ordering; #endif + /* Somehow this really interferes with GTK's own processing + of ShapeNotify events. Not sure what GTK uses them for, + but we cannot skip any of them here. */ +#ifndef USE_GTK while (XPending (dpyinfo->display)) { XNextEvent (dpyinfo->display, &xevent); @@ -18691,6 +18697,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, break; } } +#endif for (struct x_client_list_window *tem = x_dnd_toplevels; tem; tem = tem->next)