changeset 76417:e95c60f2a27e

(handle_one_xevent): Ignore buttons > 3 for the tool bar.
author Jan Djärv <jan.h.d@swipnet.se>
date Fri, 09 Mar 2007 17:41:38 +0000
parents cd10e2139125
children 354874f2b83c
files src/xterm.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Fri Mar 09 17:37:50 2007 +0000
+++ b/src/xterm.c	Fri Mar 09 17:41:38 2007 +0000
@@ -6759,15 +6759,16 @@
                 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;
                   }
               }