To: vim_dev@googlegroups.com Subject: Patch 8.1.2301 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2301 Problem: MS-Windows GUI: drawing error when background color changes. Solution: Implement gui_mch_new_colors(). (Simon Sadler) Files: src/gui_w32.c *** ../vim-8.1.2300/src/gui_w32.c 2019-11-05 21:09:18.629946582 +0100 --- src/gui_w32.c 2019-11-14 22:10:20.944659014 +0100 *************** *** 325,331 **** #endif HWND s_hwnd = NULL; static HDC s_hdc = NULL; ! static HBRUSH s_brush = NULL; #ifdef FEAT_TOOLBAR static HWND s_toolbarhwnd = NULL; --- 325,331 ---- #endif HWND s_hwnd = NULL; static HDC s_hdc = NULL; ! static HBRUSH s_brush = NULL; #ifdef FEAT_TOOLBAR static HWND s_toolbarhwnd = NULL; *************** *** 1282,1288 **** void gui_mch_new_colors(void) { ! /* nothing to do? */ } /* --- 1282,1299 ---- void gui_mch_new_colors(void) { ! 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); } /* *** ../vim-8.1.2300/src/version.c 2019-11-13 22:35:15.759521804 +0100 --- src/version.c 2019-11-15 22:40:40.432124459 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 2301, /**/ -- From "know your smileys": :-O>-o Smiley American tourist (note big mouth and camera) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///