0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 8.1.2301: MS-Windows GUI: drawing error when background color changes

Problem:    MS-Windows GUI: drawing error when background color changes.
Solution:   Implement gui_mch_new_colors(). (Simon Sadler)
This commit is contained in:
Bram Moolenaar
2019-11-15 22:41:14 +01:00
parent 1ebbb6ee45
commit ab85ca4e6a
2 changed files with 15 additions and 2 deletions

View File

@@ -1282,7 +1282,18 @@ vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
void
gui_mch_new_colors(void)
{
/* nothing to do? */
HBRUSH prevBrush;
s_brush = CreateSolidBrush(gui.back_pixel);
#ifdef SetClassLongPtr
prevBrush = (HBRUSH)SetClassLongPtr(
s_hwnd, GCLP_HBRBACKGROUND, (LONG_PTR)s_brush);
#else
prevBrush = (HBRUSH)SetClassLong(
s_hwnd, GCL_HBRBACKGROUND, (long_u)s_brush);
#endif
InvalidateRect(s_hwnd, NULL, TRUE);
DeleteObject(prevBrush);
}
/*

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2301,
/**/
2300,
/**/