Mercurial > emacs
changeset 13561:21b6b8f50143
(XTread_socket): Verify a ButtonPress was actually in the
menu bar before generating a menu_bar_activate_event event.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 15 Nov 1995 23:15:49 +0000 |
parents | 3974e093d47f |
children | 80870ef96f18 |
files | src/xterm.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Wed Nov 15 23:00:18 1995 +0000 +++ b/src/xterm.c Wed Nov 15 23:15:49 1995 +0000 @@ -4056,7 +4056,14 @@ Instead, save it away and we will pass it to Xt from kbd_buffer_get_event. That way, we can run some Lisp code first. */ - if (f && event.type == ButtonPress) + if (f && event.type == ButtonPress + /* Verify the event is really within the menu bar + and not just sent to it due to grabbing. */ + && event.xbutton.x >= 0 + && event.xbutton.x < f->output_data.x->pixel_width + && event.xbutton.y >= 0 + && event.xbutton.y < f->output_data.x->menubar_height + && event.xbutton.same_screen) { if (f->output_data.x->saved_button_event == 0) f->output_data.x->saved_button_event