emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w32term.c


From: Jason Rumney
Subject: [Emacs-diffs] Changes to emacs/src/w32term.c
Date: Thu, 24 Jan 2002 15:41:47 -0500

Index: emacs/src/w32term.c
diff -c emacs/src/w32term.c:1.139 emacs/src/w32term.c:1.140
*** emacs/src/w32term.c:1.139   Wed Jan 23 16:59:23 2002
--- emacs/src/w32term.c Thu Jan 24 15:41:46 2002
***************
*** 5453,5459 ****
  {
    struct frame *f = XFRAME (w->frame);
    int x, y, width, height, from_y, to_y, bottom_y;
!   HDC hdc = get_frame_dc (f);
  
    /* Get frame-relative bounding box of the text display area of W,
       without mode lines.  Include in this box the left and right
--- 5453,5460 ----
  {
    struct frame *f = XFRAME (w->frame);
    int x, y, width, height, from_y, to_y, bottom_y;
!   HWND hwnd = FRAME_W32_WINDOW (f);
!   HRGN expect_dirty;
  
    /* Get frame-relative bounding box of the text display area of W,
       without mode lines.  Include in this box the left and right
***************
*** 5474,5479 ****
--- 5475,5481 ----
        height = bottom_y - from_y;
        else
        height = run->height;
+       expect_dirty = CreateRectRgn (x, y + height, x + width, bottom_y);
      }
    else
      {
***************
*** 5483,5488 ****
--- 5485,5491 ----
        height = bottom_y - to_y;
        else
        height = run->height;
+       expect_dirty = CreateRectRgn (x, y, x + width, to_y);
      }
  
    BLOCK_INPUT;
***************
*** 5491,5500 ****
    updated_window = w;
    x_clear_cursor (w);
  
!   BitBlt (hdc, x, to_y, width, height, hdc, x, from_y, SRCCOPY);
!   
    UNBLOCK_INPUT;
-   release_frame_dc (f, hdc);
  }
  
  
--- 5494,5525 ----
    updated_window = w;
    x_clear_cursor (w);
  
!   {
!     RECT from;
!     RECT to;
!     HRGN dirty = CreateRectRgn (0, 0, 0, 0);
!     HRGN combined = CreateRectRgn (0, 0, 0, 0);
! 
!     from.left = to.left = x;
!     from.right = to.right = x + width;
!     from.top = from_y;
!     from.bottom = from_y + height;
!     to.top = y;
!     to.bottom = bottom_y;
! 
!     ScrollWindowEx (hwnd, 0, to_y - from_y, &from, &to, dirty,
!                   NULL, SW_INVALIDATE);
! 
!     /* Combine this with what we expect to be dirty. This covers the
!        case where not all of the region we expect is actually dirty.  */
!     CombineRgn (combined, dirty, expect_dirty, RGN_OR);
! 
!     /* If the dirty region is not what we expected, redraw the entire frame.  
*/
!     if (!EqualRgn (combined, expect_dirty))
!       SET_FRAME_GARBAGED (f);
!   }
! 
    UNBLOCK_INPUT;
  }
  
  
***************
*** 10464,10470 ****
  
        f->output_data.w32->asked_for_visible = 1;
  
! //      my_show_window (f, FRAME_W32_WINDOW (f), f->async_iconified ? 
SW_RESTORE : SW_SHOW);
        my_show_window (f, FRAME_W32_WINDOW (f), SW_SHOWNORMAL);
      }
  
--- 10489,10495 ----
  
        f->output_data.w32->asked_for_visible = 1;
  
! /*      my_show_window (f, FRAME_W32_WINDOW (f), f->async_iconified ? 
SW_RESTORE : SW_SHOW);  */
        my_show_window (f, FRAME_W32_WINDOW (f), SW_SHOWNORMAL);
      }
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]