# HG changeset patch # User Bram Moolenaar # Date 1595017804 -7200 # Node ID 75514c95b94814861ef984fb242b3384d270f79c # Parent 6f4fe1feeb11001bc17f8d4cbe522e18cacb1751 patch 8.2.1231: MS-Windows: GUI code can be cleaned up Commit: https://github.com/vim/vim/commit/945c857844b74866f90be20714aefc3149d2a991 Author: Bram Moolenaar Date: Fri Jul 17 22:17:03 2020 +0200 patch 8.2.1231: MS-Windows: GUI code can be cleaned up Problem: MS-Windows: GUI code can be cleaned up. Solution: Do a bit of cleaning up. (Ken Takata, closes https://github.com/vim/vim/issues/6465) diff --git a/src/gui_w32.c b/src/gui_w32.c --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -240,6 +240,7 @@ gui_mch_set_rendering_options(char_u *s) # define CONST # define FAR # define NEAR +# define WINAPI # undef _cdecl # define _cdecl typedef int BOOL; @@ -320,9 +321,6 @@ static int s_findrep_is_find; // TRUE f // for find/replace dialog #endif -#if !defined(FEAT_GUI) -static -#endif HWND s_hwnd = NULL; static HDC s_hdc = NULL; static HBRUSH s_brush = NULL; @@ -389,7 +387,7 @@ directx_binddc(void) #endif // use of WindowProc depends on Global IME -#define MyWindowProc vim_WindowProc +static LRESULT WINAPI MyWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); extern int current_font_height; // this is in os_mswin.c @@ -1259,12 +1257,8 @@ HandleMouseHide(UINT uMsg, LPARAM lParam } } -#ifdef PROTO -typedef int WINAPI; -#endif - - LRESULT WINAPI -vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) + static LRESULT WINAPI +MyWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { #ifdef GLOBAL_IME return global_ime_DefWindowProc(hwnd, message, wParam, lParam); @@ -3824,10 +3818,6 @@ gui_mch_browsedir(char_u *title, char_u # include "xpm_w32.h" #endif -#ifdef PROTO -# define WINAPI -#endif - #ifdef __MINGW32__ /* * Add a lot of missing defines. diff --git a/src/proto/gui_w32.pro b/src/proto/gui_w32.pro --- a/src/proto/gui_w32.pro +++ b/src/proto/gui_w32.pro @@ -5,7 +5,6 @@ int gui_mch_is_blink_off(void); void gui_mch_set_blinking(long wait, long on, long off); void gui_mch_stop_blink(int may_call_gui_update_cursor); void gui_mch_start_blink(void); -LRESULT WINAPI vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); void gui_mch_new_colors(void); void gui_mch_def_colors(void); int gui_mch_open(void); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1231, +/**/ 1230, /**/ 1229,