patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Problem: balloon_show() only works in terminal when compiled with the GUI.
Solution: Add FEAT_BEVAL_GUI and refactor to move common code out of the GUI
specific file.
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 52cadea..d1c9605 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -197,7 +197,7 @@
#ifndef __MINGW32__
# include <shellapi.h>
#endif
-#if defined(FEAT_TOOLBAR) || defined(FEAT_BEVAL) || defined(FEAT_GUI_TABLINE)
+#if defined(FEAT_TOOLBAR) || defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_TABLINE)
# include <commctrl.h>
#endif
#include <windowsx.h>
@@ -473,7 +473,7 @@
static int s_timed_out = FALSE;
static int dead_key = 0; /* 0: no dead key, 1: dead key pressed */
-#ifdef FEAT_BEVAL
+#ifdef FEAT_BEVAL_GUI
/* balloon-eval WM_NOTIFY_HANDLER */
static void Handle_WM_Notify(HWND hwnd, LPNMHDR pnmh);
static void TrackUserActivity(UINT uMsg);
@@ -1216,7 +1216,7 @@
s_wParam = wParam;
s_lParam = lParam;
-#ifdef FEAT_BEVAL
+#ifdef FEAT_BEVAL_GUI
TrackUserActivity(uMsg);
#endif
@@ -1237,7 +1237,7 @@
HANDLE_MSG(hwnd, WM_XBUTTONDOWN,_OnMouseButtonDown);
HANDLE_MSG(hwnd, WM_XBUTTONUP, _OnMouseMoveOrRelease);
-#ifdef FEAT_BEVAL
+#ifdef FEAT_BEVAL_GUI
case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
return TRUE;
#endif
@@ -4231,7 +4231,7 @@
#endif
-#ifdef FEAT_BEVAL
+#ifdef FEAT_BEVAL_GUI
# define ID_BEVAL_TOOLTIP 200
# define BEVAL_TEXT_LEN MAXPATHL
@@ -4310,7 +4310,7 @@
# define TTN_GETDISPINFO (TTN_FIRST - 0)
#endif
-#endif /* defined(FEAT_BEVAL) */
+#endif /* defined(FEAT_BEVAL_GUI) */
#if defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)
/* Older MSVC compilers don't have LPNMTTDISPINFO[AW] thus we need to define
@@ -8517,12 +8517,12 @@
}
#endif
-#if defined(FEAT_BEVAL) || defined(PROTO)
+#if defined(FEAT_BEVAL_GUI) || defined(PROTO)
/* BALLOON-EVAL IMPLEMENTATION FOR WINDOWS.
* Added by Sergey Khorev <sergey.khorev@gmail.com>
*
- * The only reused thing is gui_beval.h and get_beval_info()
+ * The only reused thing is beval.h and get_beval_info()
* from gui_beval.c (note it uses x and y of the BalloonEval struct
* to get current mouse position).
*
@@ -8847,7 +8847,7 @@
{
vim_free(beval);
}
-#endif /* FEAT_BEVAL */
+#endif /* FEAT_BEVAL_GUI */
#if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
/*