+2007-11-09 Jason Rumney <jasonr@gnu.org>
+
+ * s/ms-w32.c (USE_TOOLKIT_SCROLL_BARS): Define.
+
+ * w32term.c (w32_scroll_bar_handle_click): Use SCROLL_BAR_CLICK_EVENT.
+
+ * keyboard.c (discard_mouse_events, make_lispy_event) [WINDOWSNT]:
+ Remove W32_SCROLL_BAR_CLICK_EVENT.
+
+ * termhooks.h (enum event_kind) [WINDOWSNT]: Likewise.
+ Add MULTIMEDIA_KEY_EVENT.
+
+ * keyboard.c (lispy_function_keys) [WINDOWSNT]: Add more keys.
+ (lispy_multimedia_keys) [WINDOWSNT]: New array.
+ (make_lispy_event) [WINDOWSNT]: Use it to translate
+ MULTIMEDIA_KEY_EVENT.
+
+ * w32term.h (WM_APPCOMMAND): Define if not already.
+ (GET_APPCOMMAND_LPARAM): Likewise.
+
+ * w32term.c (w32_read_socket): Generate MULTIMEDIA_KEY_EVENT from
+ WM_APPCOMMAND.
+
+ * w32fns.c (w32_pass_multimedia_buttons_to_system): New user option.
+ (syms_of_w32fns): Export and initialize it.
+ (w32_wnd_proc): Pass WM_APPCOMMAND on to w32_read_socket.
+
2007-11-09 Chong Yidong <cyd@stupidchicken.com>
* dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE
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;
}
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. */
{