diff options
| author | Karoly Lorentey | 2007-04-22 12:12:29 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-04-22 12:12:29 +0000 |
| commit | e18c709364b095ea0be8ecabe458ac9a642a252f (patch) | |
| tree | efe814a842f932f387b3947c572bf43a548d17ef /src/macterm.c | |
| parent | 81088e260b086fe28f36964f32b6338210ec6fd8 (diff) | |
| parent | 9f25e707aaad5ed14a9448e9c5d345ff0bdbc5a7 (diff) | |
| download | emacs-e18c709364b095ea0be8ecabe458ac9a642a252f.tar.gz emacs-e18c709364b095ea0be8ecabe458ac9a642a252f.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-660
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-661
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-662
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-663
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-664
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-665
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-666
Fix read-only prompt problem in isearch
* emacs@sv.gnu.org/emacs--devo--0--patch-667
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-668
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-669
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-670
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-671
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-672
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-673
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-206
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-207
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-208
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-600
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 68 |
1 files changed, 44 insertions, 24 deletions
diff --git a/src/macterm.c b/src/macterm.c index f4e52a01174..f26c06680bc 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4484,25 +4484,24 @@ note_mouse_movement (frame, pos) | |||
| 4484 | last_mouse_motion_position = *pos; | 4484 | last_mouse_motion_position = *pos; |
| 4485 | XSETFRAME (last_mouse_motion_frame, frame); | 4485 | XSETFRAME (last_mouse_motion_frame, frame); |
| 4486 | 4486 | ||
| 4487 | if (frame == dpyinfo->mouse_face_mouse_frame | ||
| 4487 | #if TARGET_API_MAC_CARBON | 4488 | #if TARGET_API_MAC_CARBON |
| 4488 | if (!PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r))) | 4489 | && !PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r)) |
| 4489 | #else | 4490 | #else |
| 4490 | if (!PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect)) | 4491 | && !PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect) |
| 4491 | #endif | 4492 | #endif |
| 4493 | ) | ||
| 4492 | { | 4494 | { |
| 4493 | if (frame == dpyinfo->mouse_face_mouse_frame) | 4495 | /* This case corresponds to LeaveNotify in X11. If we move |
| 4494 | /* This case corresponds to LeaveNotify in X11. */ | 4496 | outside the frame, then we're certainly no longer on any text |
| 4495 | { | 4497 | in the frame. */ |
| 4496 | /* If we move outside the frame, then we're certainly no | 4498 | clear_mouse_face (dpyinfo); |
| 4497 | longer on any text in the frame. */ | 4499 | dpyinfo->mouse_face_mouse_frame = 0; |
| 4498 | clear_mouse_face (dpyinfo); | 4500 | if (!dpyinfo->grabbed) |
| 4499 | dpyinfo->mouse_face_mouse_frame = 0; | 4501 | rif->define_frame_cursor (frame, |
| 4500 | if (!dpyinfo->grabbed) | 4502 | frame->output_data.mac->nontext_cursor); |
| 4501 | rif->define_frame_cursor (frame, | ||
| 4502 | frame->output_data.mac->nontext_cursor); | ||
| 4503 | } | ||
| 4504 | return 1; | ||
| 4505 | } | 4503 | } |
| 4504 | |||
| 4506 | /* Has the mouse moved off the glyph it was on at the last sighting? */ | 4505 | /* Has the mouse moved off the glyph it was on at the last sighting? */ |
| 4507 | if (frame != last_mouse_glyph_frame | 4506 | if (frame != last_mouse_glyph_frame |
| 4508 | || !PtInRect (*pos, &last_mouse_glyph)) | 4507 | || !PtInRect (*pos, &last_mouse_glyph)) |
| @@ -4963,7 +4962,7 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height) | |||
| 4963 | #endif | 4962 | #endif |
| 4964 | #if TARGET_API_MAC_CARBON | 4963 | #if TARGET_API_MAC_CARBON |
| 4965 | ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", | 4964 | ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", |
| 4966 | #if USE_TOOLKIT_SCROLL_BARS | 4965 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 4967 | false, | 4966 | false, |
| 4968 | #else | 4967 | #else |
| 4969 | width < disp_height, | 4968 | width < disp_height, |
| @@ -5217,7 +5216,11 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5217 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5216 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5218 | if (NILP (bar->track_top)) | 5217 | if (NILP (bar->track_top)) |
| 5219 | { | 5218 | { |
| 5220 | if (sb_width >= disp_height) | 5219 | if (sb_width >= disp_height |
| 5220 | #ifdef MAC_OSX | ||
| 5221 | || sb_width < MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH | ||
| 5222 | #endif | ||
| 5223 | ) | ||
| 5221 | { | 5224 | { |
| 5222 | XSETINT (bar->track_top, 0); | 5225 | XSETINT (bar->track_top, 0); |
| 5223 | XSETINT (bar->track_height, 0); | 5226 | XSETINT (bar->track_height, 0); |
| @@ -6223,6 +6226,16 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 6223 | #endif | 6226 | #endif |
| 6224 | mac_handle_size_change (f, pixelwidth, pixelheight); | 6227 | mac_handle_size_change (f, pixelwidth, pixelheight); |
| 6225 | 6228 | ||
| 6229 | if (f->output_data.mac->internal_border_width | ||
| 6230 | != FRAME_INTERNAL_BORDER_WIDTH (f)) | ||
| 6231 | { | ||
| 6232 | mac_clear_window (f); | ||
| 6233 | f->output_data.mac->internal_border_width | ||
| 6234 | = FRAME_INTERNAL_BORDER_WIDTH (f); | ||
| 6235 | } | ||
| 6236 | |||
| 6237 | SET_FRAME_GARBAGED (f); | ||
| 6238 | |||
| 6226 | UNBLOCK_INPUT; | 6239 | UNBLOCK_INPUT; |
| 6227 | } | 6240 | } |
| 6228 | 6241 | ||
| @@ -9974,23 +9987,30 @@ mac_handle_mouse_event (next_handler, event, data) | |||
| 9974 | if (err != noErr || axis != kEventMouseWheelAxisY) | 9987 | if (err != noErr || axis != kEventMouseWheelAxisY) |
| 9975 | break; | 9988 | break; |
| 9976 | 9989 | ||
| 9977 | err = GetEventParameter (event, kEventParamMouseWheelDelta, | ||
| 9978 | typeSInt32, NULL, sizeof (SInt32), | ||
| 9979 | NULL, &delta); | ||
| 9980 | if (err != noErr) | ||
| 9981 | break; | ||
| 9982 | err = GetEventParameter (event, kEventParamMouseLocation, | 9990 | err = GetEventParameter (event, kEventParamMouseLocation, |
| 9983 | typeQDPoint, NULL, sizeof (Point), | 9991 | typeQDPoint, NULL, sizeof (Point), |
| 9984 | NULL, &point); | 9992 | NULL, &point); |
| 9985 | if (err != noErr) | 9993 | if (err != noErr) |
| 9986 | break; | 9994 | break; |
| 9995 | |||
| 9996 | SetPortWindowPort (wp); | ||
| 9997 | GlobalToLocal (&point); | ||
| 9998 | if (point.h < 0 || point.v < 0 | ||
| 9999 | || EQ (window_from_coordinates (f, point.h, point.v, 0, 0, 0, 1), | ||
| 10000 | f->tool_bar_window)) | ||
| 10001 | break; | ||
| 10002 | |||
| 10003 | err = GetEventParameter (event, kEventParamMouseWheelDelta, | ||
| 10004 | typeSInt32, NULL, sizeof (SInt32), | ||
| 10005 | NULL, &delta); | ||
| 10006 | if (err != noErr) | ||
| 10007 | break; | ||
| 10008 | |||
| 9987 | read_socket_inev->kind = WHEEL_EVENT; | 10009 | read_socket_inev->kind = WHEEL_EVENT; |
| 9988 | read_socket_inev->code = 0; | 10010 | read_socket_inev->code = 0; |
| 9989 | read_socket_inev->modifiers = | 10011 | read_socket_inev->modifiers = |
| 9990 | (mac_event_to_emacs_modifiers (event) | 10012 | (mac_event_to_emacs_modifiers (event) |
| 9991 | | ((delta < 0) ? down_modifier : up_modifier)); | 10013 | | ((delta < 0) ? down_modifier : up_modifier)); |
| 9992 | SetPortWindowPort (wp); | ||
| 9993 | GlobalToLocal (&point); | ||
| 9994 | XSETINT (read_socket_inev->x, point.h); | 10014 | XSETINT (read_socket_inev->x, point.h); |
| 9995 | XSETINT (read_socket_inev->y, point.v); | 10015 | XSETINT (read_socket_inev->y, point.v); |
| 9996 | XSETFRAME (read_socket_inev->frame_or_window, f); | 10016 | XSETFRAME (read_socket_inev->frame_or_window, f); |
| @@ -11045,7 +11065,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 11045 | else | 11065 | else |
| 11046 | { | 11066 | { |
| 11047 | /* A window has been deactivated */ | 11067 | /* A window has been deactivated */ |
| 11048 | #if USE_TOOLKIT_SCROLL_BARS | 11068 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 11049 | if (dpyinfo->grabbed && tracked_scroll_bar) | 11069 | if (dpyinfo->grabbed && tracked_scroll_bar) |
| 11050 | { | 11070 | { |
| 11051 | struct input_event event; | 11071 | struct input_event event; |