diff options
| author | Jason Rumney | 2007-11-09 12:17:19 +0000 |
|---|---|---|
| committer | Jason Rumney | 2007-11-09 12:17:19 +0000 |
| commit | 0b15176246c8f399c64d9046d5cc8a752f744b0b (patch) | |
| tree | 2155e1357ed96c638f726558d7ae30567a21153f /src | |
| parent | 0fe216b291230d10297113b4d9179f56ee44b729 (diff) | |
| download | emacs-0b15176246c8f399c64d9046d5cc8a752f744b0b.tar.gz emacs-0b15176246c8f399c64d9046d5cc8a752f744b0b.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index e5c730a528c..6199b16bb2f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -145,6 +145,9 @@ int w32_mouse_move_interval; | |||
| 145 | /* Flag to indicate if XBUTTON events should be passed on to Windows. */ | 145 | /* Flag to indicate if XBUTTON events should be passed on to Windows. */ |
| 146 | int w32_pass_extra_mouse_buttons_to_system; | 146 | int w32_pass_extra_mouse_buttons_to_system; |
| 147 | 147 | ||
| 148 | /* Flag to indicate if media keys should be passed on to Windows. */ | ||
| 149 | int w32_pass_multimedia_buttons_to_system; | ||
| 150 | |||
| 148 | /* Non nil if no window manager is in use. */ | 151 | /* Non nil if no window manager is in use. */ |
| 149 | Lisp_Object Vx_no_window_manager; | 152 | Lisp_Object Vx_no_window_manager; |
| 150 | 153 | ||
| @@ -3383,6 +3386,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3383 | signal_user_input (); | 3386 | signal_user_input (); |
| 3384 | return 0; | 3387 | return 0; |
| 3385 | 3388 | ||
| 3389 | case WM_APPCOMMAND: | ||
| 3390 | if (w32_pass_multimedia_buttons_to_system) | ||
| 3391 | goto dflt; | ||
| 3392 | /* Otherwise, pass to lisp, the same way we do with mousehwheel. */ | ||
| 3386 | case WM_MOUSEHWHEEL: | 3393 | case WM_MOUSEHWHEEL: |
| 3387 | wmsg.dwModifiers = w32_get_modifiers (); | 3394 | wmsg.dwModifiers = w32_get_modifiers (); |
| 3388 | my_post_msg (&wmsg, hwnd, msg, wParam, lParam); | 3395 | my_post_msg (&wmsg, hwnd, msg, wParam, lParam); |
| @@ -8814,6 +8821,30 @@ If this variable is non-nil, Emacs will pass them on, allowing the | |||
| 8814 | system to handle them. */); | 8821 | system to handle them. */); |
| 8815 | w32_pass_extra_mouse_buttons_to_system = 0; | 8822 | w32_pass_extra_mouse_buttons_to_system = 0; |
| 8816 | 8823 | ||
| 8824 | DEFVAR_BOOL ("w32-pass-multimedia-buttons-to-system", | ||
| 8825 | &w32_pass_multimedia_buttons_to_system, | ||
| 8826 | doc: /* If non-nil, media buttons are passed to Windows. | ||
| 8827 | Some modern keyboards contain buttons for controlling media players, web | ||
| 8828 | browsers and other applications. Generally these buttons are handled on a | ||
| 8829 | system wide basis, but by setting this to nil they are made available | ||
| 8830 | to Emacs for binding. Depending on your keyboard, additional keys that | ||
| 8831 | may be available are: | ||
| 8832 | |||
| 8833 | browser-back, browser-forward, browser-refresh, browser-stop, | ||
| 8834 | browser-search, browser-favorites, browser-home, | ||
| 8835 | mail, mail-reply, mail-forward, mail-send, | ||
| 8836 | app-1, app-2, | ||
| 8837 | help, find, new, open, close, save, print, undo, redo, copy, cut, paste, | ||
| 8838 | spell-check, correction-list, toggle-dictate-command, | ||
| 8839 | media-next, media-previous, media-stop, media-play-pause, media-select, | ||
| 8840 | media-play, media-pause, media-record, media-fast-forward, media-rewind, | ||
| 8841 | media-channel-up, media-channel-down, | ||
| 8842 | volume-mute, volume-up, volume-down, | ||
| 8843 | mic-volume-mute, mic-volume-down, mic-volume-up, mic-toggle, | ||
| 8844 | bass-down, bass-boost, bass-up, treble-down, treble-up | ||
| 8845 | */); | ||
| 8846 | w32_pass_multimedia_buttons_to_system = 1; | ||
| 8847 | |||
| 8817 | DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, | 8848 | DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, |
| 8818 | doc: /* The shape of the pointer when over text. | 8849 | doc: /* The shape of the pointer when over text. |
| 8819 | Changing the value does not affect existing frames | 8850 | Changing the value does not affect existing frames |