comparison src/macterm.c @ 66080:abad34f080c4

(note_mouse_movement, XTread_socket): Apply 2005-10-14 changes for xterm.c.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Fri, 14 Oct 2005 08:08:37 +0000
parents 02f3f5b9a38f
children 479c8c41d179 5e2d3828e89f
comparison
equal deleted inserted replaced
66079:f76fabca087e 66080:abad34f080c4
4147 another motion event, so we can check again the next time it moves. */ 4147 another motion event, so we can check again the next time it moves. */
4148 4148
4149 static Point last_mouse_motion_position; 4149 static Point last_mouse_motion_position;
4150 static Lisp_Object last_mouse_motion_frame; 4150 static Lisp_Object last_mouse_motion_frame;
4151 4151
4152 static void 4152 static int
4153 note_mouse_movement (frame, pos) 4153 note_mouse_movement (frame, pos)
4154 FRAME_PTR frame; 4154 FRAME_PTR frame;
4155 Point *pos; 4155 Point *pos;
4156 { 4156 {
4157 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (frame); 4157 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (frame);
4178 dpyinfo->mouse_face_mouse_frame = 0; 4178 dpyinfo->mouse_face_mouse_frame = 0;
4179 if (!dpyinfo->grabbed) 4179 if (!dpyinfo->grabbed)
4180 rif->define_frame_cursor (frame, 4180 rif->define_frame_cursor (frame,
4181 frame->output_data.mac->nontext_cursor); 4181 frame->output_data.mac->nontext_cursor);
4182 } 4182 }
4183 return 1;
4183 } 4184 }
4184 /* Has the mouse moved off the glyph it was on at the last sighting? */ 4185 /* Has the mouse moved off the glyph it was on at the last sighting? */
4185 else if (pos->h < last_mouse_glyph.left 4186 if (pos->h < last_mouse_glyph.left
4186 || pos->h >= last_mouse_glyph.right 4187 || pos->h >= last_mouse_glyph.right
4187 || pos->v < last_mouse_glyph.top 4188 || pos->v < last_mouse_glyph.top
4188 || pos->v >= last_mouse_glyph.bottom) 4189 || pos->v >= last_mouse_glyph.bottom)
4189 { 4190 {
4190 frame->mouse_moved = 1; 4191 frame->mouse_moved = 1;
4191 last_mouse_scroll_bar = Qnil; 4192 last_mouse_scroll_bar = Qnil;
4192 note_mouse_highlight (frame, pos->h, pos->v); 4193 note_mouse_highlight (frame, pos->h, pos->v);
4193 /* Remember which glyph we're now on. */ 4194 /* Remember which glyph we're now on. */
4194 remember_mouse_glyph (frame, pos->h, pos->v, &last_mouse_glyph); 4195 remember_mouse_glyph (frame, pos->h, pos->v, &last_mouse_glyph);
4195 } 4196 return 1;
4197 }
4198
4199 return 0;
4196 } 4200 }
4197 4201
4198 4202
4199 /************************************************************************ 4203 /************************************************************************
4200 Mouse Face 4204 Mouse Face
10029 #if !USE_CARBON_EVENTS 10033 #if !USE_CARBON_EVENTS
10030 SetRectRgn (mouse_region, er.where.h, er.where.v, 10034 SetRectRgn (mouse_region, er.where.h, er.where.v,
10031 er.where.h + 1, er.where.v + 1); 10035 er.where.h + 1, er.where.v + 1);
10032 #endif 10036 #endif
10033 previous_help_echo_string = help_echo_string; 10037 previous_help_echo_string = help_echo_string;
10034 help_echo_string = help_echo_object = help_echo_window = Qnil; 10038 help_echo_string = Qnil;
10035 help_echo_pos = -1;
10036 10039
10037 if (dpyinfo->grabbed && last_mouse_frame 10040 if (dpyinfo->grabbed && last_mouse_frame
10038 && FRAME_LIVE_P (last_mouse_frame)) 10041 && FRAME_LIVE_P (last_mouse_frame))
10039 f = last_mouse_frame; 10042 f = last_mouse_frame;
10040 else 10043 else
10089 inev.frame_or_window = window; 10092 inev.frame_or_window = window;
10090 } 10093 }
10091 10094
10092 last_window=window; 10095 last_window=window;
10093 } 10096 }
10094 note_mouse_movement (f, &mouse_pos); 10097 if (!note_mouse_movement (f, &mouse_pos))
10098 help_echo_string = previous_help_echo_string;
10095 } 10099 }
10096 } 10100 }
10097 10101
10098 /* If the contents of the global variable 10102 /* If the contents of the global variable
10099 help_echo_string has changed, generate a 10103 help_echo_string has changed, generate a