summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2007-11-09 12:20:55 +0000
committerJason Rumney <jasonr@gnu.org>2007-11-09 12:20:55 +0000
commit4b219faa3b807146947314c47190b3fde09ce4a1 (patch)
tree6a6203e45ff3d5a8fb14d676faa769c83e560560 /src/w32term.c
parentba991a0e56732e440ab4b2b509a2576b09fafef7 (diff)
downloademacs-4b219faa3b807146947314c47190b3fde09ce4a1.tar.gz
emacs-4b219faa3b807146947314c47190b3fde09ce4a1.tar.bz2
emacs-4b219faa3b807146947314c47190b3fde09ce4a1.zip
(w32_scroll_bar_handle_click): Use SCROLL_BAR_CLICK_EVENT.
(w32_read_socket): Generate MULTIMEDIA_KEY_EVENT from WM_APPCOMMAND.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c
index a0c595b3a34..4f4701b5f23 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -3970,7 +3970,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event)
if (! GC_WINDOWP (bar->window))
abort ();
- emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT;
+ emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
emacs_event->code = 0;
/* not really meaningful to distinguish up/down */
emacs_event->modifiers = msg->dwModifiers;
@@ -4337,6 +4337,29 @@ w32_read_socket (sd, expected, hold_quit)
}
break;
+ case WM_APPCOMMAND:
+ f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
+
+ if (f && !f->iconified)
+ {
+ if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
+ && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
+ {
+ clear_mouse_face (dpyinfo);
+ dpyinfo->mouse_face_hidden = 1;
+ }
+
+ if (temp_index == sizeof temp_buffer / sizeof (short))
+ temp_index = 0;
+ temp_buffer[temp_index++] = msg.msg.wParam;
+ inev.kind = MULTIMEDIA_KEY_EVENT;
+ inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam);
+ inev.modifiers = msg.dwModifiers;
+ XSETFRAME (inev.frame_or_window, f);
+ inev.timestamp = msg.msg.time;
+ }
+ break;
+
case WM_MOUSEMOVE:
/* Ignore non-movement. */
{