diff options
| author | YAMAMOTO Mitsuharu | 2007-03-10 06:26:03 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2007-03-10 06:26:03 +0000 |
| commit | 5bc21f358c94be373e23c7ab6f2dcce7d5b67baf (patch) | |
| tree | 8364261b3498d77dfabc33591668946dce447cae /src | |
| parent | c1b4bc316911b28c90a218e2792b9f24d44977bc (diff) | |
| download | emacs-5bc21f358c94be373e23c7ab6f2dcce7d5b67baf.tar.gz emacs-5bc21f358c94be373e23c7ab6f2dcce7d5b67baf.zip | |
[USE_CARBON_EVENTS] (mac_handle_mouse_event): Ignore
mouse wheel movement on title bar or tool bar.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/macterm.c | 21 |
2 files changed, 19 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index efb52506bdd..48ff0cf1a20 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-03-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macterm.c [USE_CARBON_EVENTS] (mac_handle_mouse_event): Ignore | ||
| 4 | mouse wheel movement on title bar or tool bar. | ||
| 5 | |||
| 1 | 2007-03-10 Chong Yidong <cyd@stupidchicken.com> | 6 | 2007-03-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * keyboard.c (help_form_saved_window_configs): New var. | 8 | * keyboard.c (help_form_saved_window_configs): New var. |
diff --git a/src/macterm.c b/src/macterm.c index 3dbee62d2aa..c85dc7da013 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -9988,23 +9988,30 @@ mac_handle_mouse_event (next_handler, event, data) | |||
| 9988 | if (err != noErr || axis != kEventMouseWheelAxisY) | 9988 | if (err != noErr || axis != kEventMouseWheelAxisY) |
| 9989 | break; | 9989 | break; |
| 9990 | 9990 | ||
| 9991 | err = GetEventParameter (event, kEventParamMouseWheelDelta, | ||
| 9992 | typeSInt32, NULL, sizeof (SInt32), | ||
| 9993 | NULL, &delta); | ||
| 9994 | if (err != noErr) | ||
| 9995 | break; | ||
| 9996 | err = GetEventParameter (event, kEventParamMouseLocation, | 9991 | err = GetEventParameter (event, kEventParamMouseLocation, |
| 9997 | typeQDPoint, NULL, sizeof (Point), | 9992 | typeQDPoint, NULL, sizeof (Point), |
| 9998 | NULL, &point); | 9993 | NULL, &point); |
| 9999 | if (err != noErr) | 9994 | if (err != noErr) |
| 10000 | break; | 9995 | break; |
| 9996 | |||
| 9997 | SetPortWindowPort (wp); | ||
| 9998 | GlobalToLocal (&point); | ||
| 9999 | if (point.h < 0 || point.v < 0 | ||
| 10000 | || EQ (window_from_coordinates (f, point.h, point.v, 0, 0, 0, 1), | ||
| 10001 | f->tool_bar_window)) | ||
| 10002 | break; | ||
| 10003 | |||
| 10004 | err = GetEventParameter (event, kEventParamMouseWheelDelta, | ||
| 10005 | typeSInt32, NULL, sizeof (SInt32), | ||
| 10006 | NULL, &delta); | ||
| 10007 | if (err != noErr) | ||
| 10008 | break; | ||
| 10009 | |||
| 10001 | read_socket_inev->kind = WHEEL_EVENT; | 10010 | read_socket_inev->kind = WHEEL_EVENT; |
| 10002 | read_socket_inev->code = 0; | 10011 | read_socket_inev->code = 0; |
| 10003 | read_socket_inev->modifiers = | 10012 | read_socket_inev->modifiers = |
| 10004 | (mac_event_to_emacs_modifiers (event) | 10013 | (mac_event_to_emacs_modifiers (event) |
| 10005 | | ((delta < 0) ? down_modifier : up_modifier)); | 10014 | | ((delta < 0) ? down_modifier : up_modifier)); |
| 10006 | SetPortWindowPort (wp); | ||
| 10007 | GlobalToLocal (&point); | ||
| 10008 | XSETINT (read_socket_inev->x, point.h); | 10015 | XSETINT (read_socket_inev->x, point.h); |
| 10009 | XSETINT (read_socket_inev->y, point.v); | 10016 | XSETINT (read_socket_inev->y, point.v); |
| 10010 | XSETFRAME (read_socket_inev->frame_or_window, f); | 10017 | XSETFRAME (read_socket_inev->frame_or_window, f); |