Changeset 3901

Show
Ignore:
Timestamp:
10/12/05 21:13:32 (3 years ago)
Author:
horiguti
Message:

mw32term.c: Restore mouse-face control of mouse-cursor hiding functions.
xdisp.c: Fix of ticket:166 (Crash with many frames)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r3900 r3901  
     12005-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 
    1132005-10-12  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
    214        * mw32fns.c: include <windows.h> to use 
  • trunk/src/mw32term.c

    r3900 r3901  
    352352  int ret; 
    353353  int retry = SAVEDC_RETRY; 
     354  int cause = 0; 
    354355 
    355356  do 
     
    360361 
    361362  if (ret == 0) 
    362     abort (); /* Yield */ 
    363  
     363    { 
     364      cause = GetLastError(); 
     365      abort (); /* Yield */ 
     366    } 
    364367  return ret; 
    365368} 
     
    41874190    { 
    41884191      if (dpyinfo->mouse_cursor_stat < 0) 
     4192          ShowCursor (TRUE); 
     4193      dpyinfo->mouse_cursor_stat = 0; 
     4194 
     4195      if (dpyinfo->mouse_face_hidden) 
    41894196        { 
    4190           dpyinfo->mouse_cursor_stat = 0; 
    4191           ShowCursor (TRUE); 
     4197          dpyinfo->mouse_face_hidden = 0; 
     4198          clear_mouse_face (dpyinfo); 
    41924199        } 
     4200 
    41934201      return; 
    41944202    } 
     
    42104218          last_mouse_movement_time = msg.time; 
    42114219 
    4212           if (dpyinfo->mouse_cursor_stat == -1
     4220          if (dpyinfo->mouse_cursor_stat < 0
    42134221            { 
    42144222              dpyinfo->mouse_cursor_stat = 0; 
    42154223              ShowCursor (TRUE); 
    42164224            } 
     4225          if (dpyinfo->mouse_face_hidden) 
     4226            {    
     4227              dpyinfo->mouse_face_hidden = 0; 
     4228              clear_mouse_face (dpyinfo); 
     4229            } 
     4230 
    42174231        } 
    42184232      break; 
     
    42394253                  ShowCursor (FALSE); 
    42404254                  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                    } 
    42414261                } 
    42424262            } 
     
    42504270          mouse_hide_timer = 0; 
    42514271        }       
     4272      dpyinfo->mouse_face_hidden = 0; 
     4273 
    42524274      break; 
    42534275 
     
    42604282          ShowCursor (TRUE); 
    42614283        } 
     4284      if (dpyinfo->mouse_face_hidden) 
     4285        { 
     4286          dpyinfo->mouse_face_hidden = 0; 
     4287          clear_mouse_face (dpyinfo); 
     4288        } 
     4289       
    42624290      break; 
    42634291 
     
    42734301 
    42744302      if (dpyinfo->mouse_cursor_stat < 0) 
    4275         ShowCursor (TRUE); 
     4303          ShowCursor (TRUE); 
    42764304 
    42774305      dpyinfo->mouse_cursor_stat = 0; 
    42784306      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        } 
    42794313 
    42804314      break; 
     
    42854319          dpyinfo->mouse_cursor_stat = -1; 
    42864320          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            } 
    42874327        } 
    42884328      break; 
     
    43654405        { 
    43664406        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  
    43734407        case WM_SYSKEYDOWN: 
    43744408 
     
    45344568              XSETFRAME (last_mouse_motion_frame, f); 
    45354569              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); 
    45414570            } 
    45424571 
  • trunk/src/xdisp.c

    r3894 r3901  
    2094720947    mouse_face_here_p = 1; 
    2094820948 
     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 
    2094920960  /* Maybe clear the display under the cursor.  */ 
    2095020961  if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) 
     
    2096320974                   window_box_width (w, TEXT_AREA) - w->phys_cursor.x); 
    2096420975 
    20965       /* erase_phys_cursor seems to be called always on message thread 
    20966          and hdc of message thread is acquired by BeginPaint () so 
    20967          cursor region is out of clipped region and cannot be updated 
    20968          in most cases. Thus, use main thread hdc to erase the 
    20969          cursor. */ 
    20970 #ifdef MEADOW 
    20971       if (! MW32_MAIN_THREAD_P ()) 
    20972         f->output_data.mw32->message_thread_hdc = f->output_data.mw32->hdc; 
    20973 #endif 
    2097420976      rif->clear_frame_area (f, x, y, width, cursor_row->visible_height); 
    2097520977    }