changeset 44108:9b9674209839

(w32_handle_tool_bar_click): Detect up and down events correctly. Do not pass up_modifier to keyboard buffer.
author Jason Rumney <jasonr@gnu.org>
date Sat, 23 Mar 2002 00:33:22 +0000
parents c10785cb0f83
children b615e4daf825
files src/w32term.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Fri Mar 22 23:40:48 2002 +0000
+++ b/src/w32term.c	Sat Mar 23 00:33:22 2002 +0000
@@ -7064,7 +7064,7 @@
   if (NILP (enabled_p))
     return;
   
-  if (button_event->kind == mouse_click)
+  if (button_event->modifiers & down_modifier)
     {
       /* Show item in pressed state.  */
       show_mouse_face (dpyinfo, DRAW_IMAGE_SUNKEN);
@@ -7091,7 +7091,8 @@
       event.kind = TOOL_BAR_EVENT;
       event.frame_or_window = frame;
       event.arg = key;
-      event.modifiers = button_event->modifiers;
+      /* The keyboard buffer doesn't like the up modifier being set.  */
+      event.modifiers = button_event->modifiers & ~up_modifier;
       kbd_buffer_store_event (&event);
       last_tool_bar_item = -1;
     }