mirror of
https://github.com/vim/vim
synced 2025-09-15 16:39:43 +00: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:
@@ -325,7 +325,7 @@ static
|
||||
#endif
|
||||
HWND s_hwnd = NULL;
|
||||
static HDC s_hdc = NULL;
|
||||
static HBRUSH s_brush = NULL;
|
||||
static HBRUSH s_brush = NULL;
|
||||
|
||||
#ifdef FEAT_TOOLBAR
|
||||
static HWND s_toolbarhwnd = NULL;
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2301,
|
||||
/**/
|
||||
2300,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user