Changeset 3039

Show
Ignore:
Timestamp:
03/07/03 23:51:40 (6 years ago)
Author:
miyoshi
Message:

* mw32term.c (mw32i_scroll_run): Sync up with Emacs-21.3.50.

* mw32term.h: Undefine VK_KANA because Cygwin header file defines
a wrong virtual key code as VK_KANA.

Files:

Legend:

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

    r3038 r3039  
     12003-03-07  MIYOSHI Masanori  <miyoshi@boreas.dti.ne.jp> 
     2 
     3        * mw32term.c (mw32i_scroll_run): Sync up with Emacs-21.3.50. 
     4 
     5        * mw32term.h: Undefine VK_KANA because Cygwin header file defines 
     6        a wrong virtual key code as VK_KANA. 
     7 
    182003-03-06  MIYOSHI Masanori  <miyoshi@boreas.dti.ne.jp> 
    29 
  • work/cvs2svn/src/mw32term.c

    r3038 r3039  
    53365336  struct frame *f = XFRAME (w->frame); 
    53375337  int x, y, width, height, from_y, to_y, bottom_y; 
    5338   HDC hdc; 
     5338  HWND hwnd = FRAME_MW32_WINDOW (f); 
     5339  HRGN expect_dirty; 
    53395340 
    53405341  /* Get frame-relative bounding box of the text display area of W, 
     
    53575358      else 
    53585359        height = run->height; 
     5360      expect_dirty = CreateRectRgn (x, y + height, x + width, bottom_y); 
    53595361    } 
    53605362  else 
     
    53665368      else 
    53675369        height = run->height; 
     5370      expect_dirty = CreateRectRgn (x, y, x + width, to_y); 
    53685371    } 
    53695372 
     
    53745377  mw32_clear_cursor (w); 
    53755378 
    5376   hdc = FRAME_HDC(f); 
    5377   BitBlt (hdc, x, to_y, width, height, hdc, x, from_y, SRCCOPY); 
    5378   /* If we should require GdiFlush(), 
    5379      insert here.  */ 
     5379  { 
     5380    RECT from; 
     5381    RECT to; 
     5382    HRGN dirty = CreateRectRgn (0, 0, 0, 0); 
     5383    HRGN combined = CreateRectRgn (0, 0, 0, 0); 
     5384 
     5385    from.left = to.left = x; 
     5386    from.right = to.right = x + width; 
     5387    from.top = from_y; 
     5388    from.bottom = from_y + height; 
     5389    to.top = y; 
     5390    to.bottom = bottom_y; 
     5391 
     5392    ScrollWindowEx (hwnd, 0, to_y - from_y, &from, &to, dirty, 
     5393                    NULL, SW_INVALIDATE); 
     5394 
     5395    /* Combine this with what we expect to be dirty. This covers the 
     5396       case where not all of the region we expect is actually dirty.  */ 
     5397    CombineRgn (combined, dirty, expect_dirty, RGN_OR); 
     5398 
     5399    /* If the dirty region is not what we expected, redraw the entire frame.  */ 
     5400    if (!EqualRgn (combined, expect_dirty)) 
     5401      SET_FRAME_GARBAGED (f); 
     5402  } 
    53805403   
    53815404  UNBLOCK_INPUT; 
  • work/cvs2svn/src/mw32term.h

    r3030 r3039  
    908908#define VK_KANJI 0x19 
    909909#endif 
     910 
     911#if defined(__MINGW32__) && defined(VK_KANA) && VK_KANA != 0x15 
     912/* Cygwin header file defines a wrong virtual key code as VK_KANA!  */ 
     913#undef VK_KANA 
     914#endif 
     915 
    910916#ifndef VK_KANA 
    911917#define VK_KANA  0x15