Changeset 3901
- Timestamp:
- 10/12/05 21:13:32 (3 years ago)
- Files:
-
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/mw32term.c (modified) (11 diffs)
- trunk/src/xdisp.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ChangeLog.Meadow
r3900 r3901 1 2005-10-12 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * mw32term.c: (show_or_hide_mouse_cursor): Do mouse-face control. 4 (mw32_message_loop): Move code about mouse-face hiding into 5 show_or_hide_mouse_cursor. 6 7 * xdisp.c (erase_phys_cursor): Now message_thread_hdc here is not 8 from BeginPaint(), so let it be used when valid. Re-get main 9 thread hdc when hdc is invalidated. Move position of the code 10 block to cover draw_phys_cursor_glyph(). 11 Fixed ticket:166 12 1 13 2005-10-12 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 14 * mw32fns.c: include <windows.h> to use trunk/src/mw32term.c
r3900 r3901 352 352 int ret; 353 353 int retry = SAVEDC_RETRY; 354 int cause = 0; 354 355 355 356 do … … 360 361 361 362 if (ret == 0) 362 abort (); /* Yield */ 363 363 { 364 cause = GetLastError(); 365 abort (); /* Yield */ 366 } 364 367 return ret; 365 368 } … … 4187 4190 { 4188 4191 if (dpyinfo->mouse_cursor_stat < 0) 4192 ShowCursor (TRUE); 4193 dpyinfo->mouse_cursor_stat = 0; 4194 4195 if (dpyinfo->mouse_face_hidden) 4189 4196 { 4190 dpyinfo->mouse_ cursor_stat= 0;4191 ShowCursor (TRUE);4197 dpyinfo->mouse_face_hidden = 0; 4198 clear_mouse_face (dpyinfo); 4192 4199 } 4200 4193 4201 return; 4194 4202 } … … 4210 4218 last_mouse_movement_time = msg.time; 4211 4219 4212 if (dpyinfo->mouse_cursor_stat == -1)4220 if (dpyinfo->mouse_cursor_stat < 0) 4213 4221 { 4214 4222 dpyinfo->mouse_cursor_stat = 0; 4215 4223 ShowCursor (TRUE); 4216 4224 } 4225 if (dpyinfo->mouse_face_hidden) 4226 { 4227 dpyinfo->mouse_face_hidden = 0; 4228 clear_mouse_face (dpyinfo); 4229 } 4230 4217 4231 } 4218 4232 break; … … 4239 4253 ShowCursor (FALSE); 4240 4254 dpyinfo->mouse_cursor_stat = -1; 4255 if (!dpyinfo->mouse_face_hidden 4256 && INTEGERP (Vmouse_highlight)) 4257 { 4258 clear_mouse_face (dpyinfo); 4259 dpyinfo->mouse_face_hidden = 1; 4260 } 4241 4261 } 4242 4262 } … … 4250 4270 mouse_hide_timer = 0; 4251 4271 } 4272 dpyinfo->mouse_face_hidden = 0; 4273 4252 4274 break; 4253 4275 … … 4260 4282 ShowCursor (TRUE); 4261 4283 } 4284 if (dpyinfo->mouse_face_hidden) 4285 { 4286 dpyinfo->mouse_face_hidden = 0; 4287 clear_mouse_face (dpyinfo); 4288 } 4289 4262 4290 break; 4263 4291 … … 4273 4301 4274 4302 if (dpyinfo->mouse_cursor_stat < 0) 4275 ShowCursor (TRUE);4303 ShowCursor (TRUE); 4276 4304 4277 4305 dpyinfo->mouse_cursor_stat = 0; 4278 4306 last_mouse_movement_time = msg.time; 4307 4308 if (dpyinfo->mouse_face_hidden) 4309 { 4310 dpyinfo->mouse_face_hidden = 0; 4311 clear_mouse_face (dpyinfo); 4312 } 4279 4313 4280 4314 break; … … 4285 4319 dpyinfo->mouse_cursor_stat = -1; 4286 4320 ShowCursor (FALSE); 4321 4322 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) 4323 { 4324 clear_mouse_face (dpyinfo); 4325 dpyinfo->mouse_face_hidden = 1; 4326 } 4287 4327 } 4288 4328 break; … … 4365 4405 { 4366 4406 case WM_KEYDOWN: 4367 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))4368 {4369 clear_mouse_face (dpyinfo);4370 dpyinfo->mouse_face_hidden = 1;4371 }4372 4373 4407 case WM_SYSKEYDOWN: 4374 4408 … … 4534 4568 XSETFRAME (last_mouse_motion_frame, f); 4535 4569 dpyinfo->mouse_face_mouse_frame = f; 4536 }4537 if (dpyinfo->mouse_face_hidden)4538 {4539 dpyinfo->mouse_face_hidden = 0;4540 clear_mouse_face (dpyinfo);4541 4570 } 4542 4571 trunk/src/xdisp.c
r3894 r3901 20947 20947 mouse_face_here_p = 1; 20948 20948 20949 #ifdef MEADOW 20950 if (! MW32_MAIN_THREAD_P () 20951 && f->output_data.mw32->message_thread_hdc == INVALID_HANDLE_VALUE) 20952 { 20953 if (f->output_data.mw32->hdc == INVALID_HANDLE_VALUE) 20954 mw32_get_frame_hdc (f); 20955 20956 f->output_data.mw32->message_thread_hdc = f->output_data.mw32->hdc; 20957 } 20958 #endif 20959 20949 20960 /* Maybe clear the display under the cursor. */ 20950 20961 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) … … 20963 20974 window_box_width (w, TEXT_AREA) - w->phys_cursor.x); 20964 20975 20965 /* erase_phys_cursor seems to be called always on message thread20966 and hdc of message thread is acquired by BeginPaint () so20967 cursor region is out of clipped region and cannot be updated20968 in most cases. Thus, use main thread hdc to erase the20969 cursor. */20970 #ifdef MEADOW20971 if (! MW32_MAIN_THREAD_P ())20972 f->output_data.mw32->message_thread_hdc = f->output_data.mw32->hdc;20973 #endif20974 20976 rif->clear_frame_area (f, x, y, width, cursor_row->visible_height); 20975 20977 }
