[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0f3ce51a0d: Don't save menu bar events that land on the menu bar
From: |
Po Lu |
Subject: |
master 0f3ce51a0d: Don't save menu bar events that land on the menu bar itself |
Date: |
Sun, 27 Feb 2022 20:40:59 -0500 (EST) |
branch: master
commit 0f3ce51a0d5f2aabad3d3aeb3d86d52b152deef0
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Don't save menu bar events that land on the menu bar itself
* src/xterm.c (handle_one_xevent): Ignore menu bar events which
land on the menu bar itself instead of a button.
---
src/xterm.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 2656b30472..520de5fcf0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11112,12 +11112,26 @@ handle_one_xevent (struct x_display_info *dpyinfo,
&& event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
&& event->xbutton.same_screen)
{
- if (!f->output_data.x->saved_menu_event)
- f->output_data.x->saved_menu_event = xmalloc (sizeof *event);
- *f->output_data.x->saved_menu_event = *event;
- inev.ie.kind = MENU_BAR_ACTIVATE_EVENT;
- XSETFRAME (inev.ie.frame_or_window, f);
- *finish = X_EVENT_DROP;
+#ifdef USE_MOTIF
+ unsigned char column_type;
+ Widget widget;
+
+ widget = XtWindowToWidget (dpyinfo->display,
+ event->xbutton.window);
+ XtVaGetValues (widget, XmNrowColumnType, &column_type, NULL);
+
+ if (column_type != XmMENU_BAR)
+ {
+#endif
+ if (!f->output_data.x->saved_menu_event)
+ f->output_data.x->saved_menu_event = xmalloc (sizeof *event);
+ *f->output_data.x->saved_menu_event = *event;
+ inev.ie.kind = MENU_BAR_ACTIVATE_EVENT;
+ XSETFRAME (inev.ie.frame_or_window, f);
+ *finish = X_EVENT_DROP;
+#ifdef USE_MOTIF
+ }
+#endif
}
else
goto OTHER;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0f3ce51a0d: Don't save menu bar events that land on the menu bar itself,
Po Lu <=