Patch 8.2.4486

10 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 1, 2022, 11:03:57 AM3/1/22
to vim...@googlegroups.com

Patch 8.2.4486
Problem: MS-Windows GUI: slow scrolling with maximized window.
Solution: Use a better way to check the window is on screen. (Ken Takata,
closes #9865)
Files: src/gui_w32.c


*** ../vim-8.2.4485/src/gui_w32.c 2022-02-24 11:39:35.960798129 +0000
--- src/gui_w32.c 2022-03-01 15:56:37.435430518 +0000
***************
*** 3016,3022 ****
}

/*
! * Check if the whole area of the specified window is on-screen.
*
* Note about DirectX: Windows 10 1809 or above no longer maintains image of
* the window portion that is off-screen. Scrolling by DWriteContext_Scroll()
--- 3016,3022 ----
}

/*
! * Check if the whole client area of the specified window is on-screen.
*
* Note about DirectX: Windows 10 1809 or above no longer maintains image of
* the window portion that is off-screen. Scrolling by DWriteContext_Scroll()
***************
*** 3026,3041 ****
is_window_onscreen(HWND hwnd)
{
RECT rc;

! GetWindowRect(hwnd, &rc);

! if (!is_point_onscreen(rc.left, rc.top))
return FALSE;
! if (!is_point_onscreen(rc.left, rc.bottom))
return FALSE;
! if (!is_point_onscreen(rc.right, rc.top))
return FALSE;
! if (!is_point_onscreen(rc.right, rc.bottom))
return FALSE;
return TRUE;
}
--- 3026,3048 ----
is_window_onscreen(HWND hwnd)
{
RECT rc;
+ POINT p1, p2;

! GetClientRect(hwnd, &rc);
! p1.x = rc.left;
! p1.y = rc.top;
! p2.x = rc.right - 1;
! p2.y = rc.bottom - 1;
! ClientToScreen(hwnd, &p1);
! ClientToScreen(hwnd, &p2);

! if (!is_point_onscreen(p1.x, p1.y))
return FALSE;
! if (!is_point_onscreen(p1.x, p2.y))
return FALSE;
! if (!is_point_onscreen(p2.x, p1.y))
return FALSE;
! if (!is_point_onscreen(p2.x, p2.y))
return FALSE;
return TRUE;
}
*** ../vim-8.2.4485/src/version.c 2022-02-28 21:02:16.271053073 +0000
--- src/version.c 2022-03-01 15:57:57.107424431 +0000
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 4486,
/**/

--
Never eat yellow snow.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages