From: Po Lu Date: Thu, 10 Mar 2022 01:16:39 +0000 (+0800) Subject: Fix stray button release events being reported on GTK 2 X-Git-Tag: emacs-29.0.90~1937 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a845b2cd0e771b39b778daf4941e5c02fa8e6b8;p=emacs.git Fix stray button release events being reported on GTK 2 * src/xterm.c (handle_one_xevent): Drop ButtonRelease events that are destined for a popup menu. --- diff --git a/src/xterm.c b/src/xterm.c index 0d77ea0c198..5b1e1023799 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12435,6 +12435,15 @@ handle_one_xevent (struct x_display_info *dpyinfo, g_object_ref (copy->button.window); + if (popup_activated () + && xev->evtype == XI_ButtonRelease) + { + *finish = X_EVENT_DROP; + gtk_main_do_event (copy); + gdk_event_free (copy); + goto XI_OTHER; + } + gtk_main_do_event (copy); gdk_event_free (copy); #endif