]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix stray button release events being reported on GTK 2
authorPo Lu <luangruo@yahoo.com>
Thu, 10 Mar 2022 01:16:39 +0000 (09:16 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 10 Mar 2022 01:16:39 +0000 (09:16 +0800)
* src/xterm.c (handle_one_xevent): Drop ButtonRelease events
that are destined for a popup menu.

src/xterm.c

index 0d77ea0c198320abdef8d0aaf78e9c37a080a0d9..5b1e10237993504f8dd7fbb57caed9ec7b14d682 100644 (file)
@@ -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