comparison src/w32term.c @ 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 cdcab7b110f6
children ed87203c48f5
comparison
equal deleted inserted replaced
44107:c10785cb0f83 44108:9b9674209839
7062 /* If item is disabled, do nothing. */ 7062 /* If item is disabled, do nothing. */
7063 enabled_p = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_ENABLED_P); 7063 enabled_p = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_ENABLED_P);
7064 if (NILP (enabled_p)) 7064 if (NILP (enabled_p))
7065 return; 7065 return;
7066 7066
7067 if (button_event->kind == mouse_click) 7067 if (button_event->modifiers & down_modifier)
7068 { 7068 {
7069 /* Show item in pressed state. */ 7069 /* Show item in pressed state. */
7070 show_mouse_face (dpyinfo, DRAW_IMAGE_SUNKEN); 7070 show_mouse_face (dpyinfo, DRAW_IMAGE_SUNKEN);
7071 dpyinfo->mouse_face_image_state = DRAW_IMAGE_SUNKEN; 7071 dpyinfo->mouse_face_image_state = DRAW_IMAGE_SUNKEN;
7072 last_tool_bar_item = prop_idx; 7072 last_tool_bar_item = prop_idx;
7089 kbd_buffer_store_event (&event); 7089 kbd_buffer_store_event (&event);
7090 7090
7091 event.kind = TOOL_BAR_EVENT; 7091 event.kind = TOOL_BAR_EVENT;
7092 event.frame_or_window = frame; 7092 event.frame_or_window = frame;
7093 event.arg = key; 7093 event.arg = key;
7094 event.modifiers = button_event->modifiers; 7094 /* The keyboard buffer doesn't like the up modifier being set. */
7095 event.modifiers = button_event->modifiers & ~up_modifier;
7095 kbd_buffer_store_event (&event); 7096 kbd_buffer_store_event (&event);
7096 last_tool_bar_item = -1; 7097 last_tool_bar_item = -1;
7097 } 7098 }
7098 } 7099 }
7099 7100