From a3a44a5a78c7f55064e2a37aae519c394b66fd93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 9 Mar 2007 17:42:12 +0000 Subject: [PATCH] (handle_one_xevent): Ignore buttons > 3 for the tool bar. --- src/ChangeLog | 4 ++++ src/xterm.c | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cad1ad4e210..0db2afdbb4f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-03-09 Jan Dj,Ad(Brv + + * xterm.c (handle_one_xevent): Ignore buttons > 3 for the tool bar. + 2007-03-09 Juanma Barranquero * keymap.c (Fdescribe_buffer_bindings): Check that BUFFER is valid. diff --git a/src/xterm.c b/src/xterm.c index e9cf5fd6d0e..4f77e22ac59 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6759,15 +6759,16 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) int y = event.xbutton.y; window = window_from_coordinates (f, x, y, 0, 0, 0, 1); - if (EQ (window, f->tool_bar_window)) + tool_bar_p = EQ (window, f->tool_bar_window); + + if (tool_bar_p && event.xbutton.button < 4) { - if (event.xbutton.type == ButtonPress) - handle_tool_bar_click (f, x, y, 1, 0); - else - handle_tool_bar_click (f, x, y, 0, - x_x_to_emacs_modifiers (dpyinfo, + if (event.xbutton.type == ButtonPress) + handle_tool_bar_click (f, x, y, 1, 0); + else + handle_tool_bar_click (f, x, y, 0, + x_x_to_emacs_modifiers (dpyinfo, event.xbutton.state)); - tool_bar_p = 1; } } -- 2.39.2