diff options
| author | Po Lu | 2022-03-10 09:16:39 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-10 09:16:39 +0800 |
| commit | 4a845b2cd0e771b39b778daf4941e5c02fa8e6b8 (patch) | |
| tree | 7eb33542003d6e51e6a5925e45f59bd7f16c08aa /src | |
| parent | 70d63ead212b7ca1e561b869d44fddb14d0445af (diff) | |
| download | emacs-4a845b2cd0e771b39b778daf4941e5c02fa8e6b8.tar.gz emacs-4a845b2cd0e771b39b778daf4941e5c02fa8e6b8.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 9 insertions, 0 deletions
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, | |||
| 12435 | 12435 | ||
| 12436 | g_object_ref (copy->button.window); | 12436 | g_object_ref (copy->button.window); |
| 12437 | 12437 | ||
| 12438 | if (popup_activated () | ||
| 12439 | && xev->evtype == XI_ButtonRelease) | ||
| 12440 | { | ||
| 12441 | *finish = X_EVENT_DROP; | ||
| 12442 | gtk_main_do_event (copy); | ||
| 12443 | gdk_event_free (copy); | ||
| 12444 | goto XI_OTHER; | ||
| 12445 | } | ||
| 12446 | |||
| 12438 | gtk_main_do_event (copy); | 12447 | gtk_main_do_event (copy); |
| 12439 | gdk_event_free (copy); | 12448 | gdk_event_free (copy); |
| 12440 | #endif | 12449 | #endif |