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:
@@ -1282,7 +1282,18 @@ vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
void
|
void
|
||||||
gui_mch_new_colors(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[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2301,
|
||||||
/**/
|
/**/
|
||||||
2300,
|
2300,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user