diff options
| author | Jason Rumney | 2002-01-13 12:14:56 +0000 |
|---|---|---|
| committer | Jason Rumney | 2002-01-13 12:14:56 +0000 |
| commit | 742145478bc9c3ad900ca8bad82b9eb87893eaad (patch) | |
| tree | c6428b8ae6ef61b42ae123096cfae1aa3fb266f4 /src | |
| parent | 76e4fd8c61b4bb3d045fd1fdd541a821184ba4d6 (diff) | |
| download | emacs-742145478bc9c3ad900ca8bad82b9eb87893eaad.tar.gz emacs-742145478bc9c3ad900ca8bad82b9eb87893eaad.zip | |
(w32_pass_extra_mouse_buttons_to_system): New user option.
(syms_of_w32fns): DEFVAR_BOOL it.
(w32_wnd_proc): Handle new "XBUTTON" messages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index d9587b8b4bb..a2b83c67bd3 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -142,6 +142,9 @@ Lisp_Object Vw32_mouse_button_tolerance; | |||
| 142 | events that are passed on to the event loop. */ | 142 | events that are passed on to the event loop. */ |
| 143 | Lisp_Object Vw32_mouse_move_interval; | 143 | Lisp_Object Vw32_mouse_move_interval; |
| 144 | 144 | ||
| 145 | /* Flag to indicate if XBUTTON events should be passed on to Windows. */ | ||
| 146 | int w32_pass_extra_mouse_buttons_to_system; | ||
| 147 | |||
| 145 | /* The name we're using in resource queries. */ | 148 | /* The name we're using in resource queries. */ |
| 146 | Lisp_Object Vx_resource_name; | 149 | Lisp_Object Vx_resource_name; |
| 147 | 150 | ||
| @@ -4570,6 +4573,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4570 | } | 4573 | } |
| 4571 | return 0; | 4574 | return 0; |
| 4572 | 4575 | ||
| 4576 | case WM_XBUTTONDOWN: | ||
| 4577 | case WM_XBUTTONUP: | ||
| 4578 | if (w32_pass_extra_mouse_buttons_to_system) | ||
| 4579 | goto dflt; | ||
| 4580 | /* else fall through and process them. */ | ||
| 4573 | case WM_MBUTTONDOWN: | 4581 | case WM_MBUTTONDOWN: |
| 4574 | case WM_MBUTTONUP: | 4582 | case WM_MBUTTONUP: |
| 4575 | handle_plain_button: | 4583 | handle_plain_button: |
| @@ -4577,7 +4585,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4577 | BOOL up; | 4585 | BOOL up; |
| 4578 | int button; | 4586 | int button; |
| 4579 | 4587 | ||
| 4580 | if (parse_button (msg, &button, &up)) | 4588 | if (parse_button (msg, HIWORD (wParam), &button, &up)) |
| 4581 | { | 4589 | { |
| 4582 | if (up) ReleaseCapture (); | 4590 | if (up) ReleaseCapture (); |
| 4583 | else SetCapture (hwnd); | 4591 | else SetCapture (hwnd); |
| @@ -4592,7 +4600,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4592 | 4600 | ||
| 4593 | wmsg.dwModifiers = w32_get_modifiers (); | 4601 | wmsg.dwModifiers = w32_get_modifiers (); |
| 4594 | my_post_msg (&wmsg, hwnd, msg, wParam, lParam); | 4602 | my_post_msg (&wmsg, hwnd, msg, wParam, lParam); |
| 4595 | return 0; | 4603 | |
| 4604 | /* Need to return true for XBUTTON messages, false for others, | ||
| 4605 | to indicate that we processed the message. */ | ||
| 4606 | return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP); | ||
| 4596 | 4607 | ||
| 4597 | case WM_MOUSEMOVE: | 4608 | case WM_MOUSEMOVE: |
| 4598 | /* If the mouse has just moved into the frame, start tracking | 4609 | /* If the mouse has just moved into the frame, start tracking |
| @@ -14507,6 +14518,16 @@ successive mouse move (or scroll bar drag) events before they are | |||
| 14507 | reported as lisp events. */); | 14518 | reported as lisp events. */); |
| 14508 | XSETINT (Vw32_mouse_move_interval, 0); | 14519 | XSETINT (Vw32_mouse_move_interval, 0); |
| 14509 | 14520 | ||
| 14521 | DEFVAR_BOOL ("w32-pass-extra-mouse-buttons-to-system", | ||
| 14522 | &w32_pass_extra_mouse_buttons_to_system, | ||
| 14523 | doc: /* Non-nil if the fourth and fifth mouse buttons are passed to Windows. | ||
| 14524 | Recent versions of Windows support mice with up to five buttons. | ||
| 14525 | Since most applications don't support these extra buttons, most mouse | ||
| 14526 | drivers will allow you to map them to functions at the system level. | ||
| 14527 | If this variable is non-nil, Emacs will pass them on, allowing the | ||
| 14528 | system to handle them. */); | ||
| 14529 | w32_pass_extra_mouse_buttons_to_system = 0; | ||
| 14530 | |||
| 14510 | init_x_parm_symbols (); | 14531 | init_x_parm_symbols (); |
| 14511 | 14532 | ||
| 14512 | DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, | 14533 | DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, |