mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.2.4486: MS-Windows GUI: slow scrolling with maximized window
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)
This commit is contained in:
@@ -3016,7 +3016,7 @@ is_point_onscreen(int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the whole area of the specified window is on-screen.
|
* 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
|
* Note about DirectX: Windows 10 1809 or above no longer maintains image of
|
||||||
* the window portion that is off-screen. Scrolling by DWriteContext_Scroll()
|
* the window portion that is off-screen. Scrolling by DWriteContext_Scroll()
|
||||||
@@ -3026,16 +3026,23 @@ is_point_onscreen(int x, int y)
|
|||||||
is_window_onscreen(HWND hwnd)
|
is_window_onscreen(HWND hwnd)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
POINT p1, p2;
|
||||||
|
|
||||||
GetWindowRect(hwnd, &rc);
|
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(rc.left, rc.top))
|
if (!is_point_onscreen(p1.x, p1.y))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!is_point_onscreen(rc.left, rc.bottom))
|
if (!is_point_onscreen(p1.x, p2.y))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!is_point_onscreen(rc.right, rc.top))
|
if (!is_point_onscreen(p2.x, p1.y))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!is_point_onscreen(rc.right, rc.bottom))
|
if (!is_point_onscreen(p2.x, p2.y))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4486,
|
||||||
/**/
|
/**/
|
||||||
4485,
|
4485,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user