Hi,
I have fixed the following issue from the todo.txt:
> 8 Win32: When mouse is hidden and in the toolbar, moving it won't make it
> appear. (Sami Salonen)
It was the same for the tabline.
HandleMouseHide() is called inside the main WndProc. However, when
moving mouse in the toolbar or the tabline, mouse events are not
sent to the main WndProc. So we have to hook the events using
SubclassWindow().
Please check the attached patch.
Actually, it is also the same for scrollbars, but it seems a little bit
difficult to fix because Vim can have two or more scrollbars.
Regards,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
# HG changeset patch
# Parent 6fae52d7f74eaf5252eff8b6ddc3d921fb545cab
diff --git a/src/gui_w32.c b/src/gui_w32.c
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -483,11 +483,13 @@
static int s_usenewlook; /* emulate W95/NT4 non-bold dialogs */
#ifdef FEAT_TOOLBAR
static void initialise_toolbar(void);
+static LRESULT CALLBACK toolbar_wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static int get_toolbar_bitmap(vimmenu_T *menu);
#endif
#ifdef FEAT_GUI_TABLINE
static void initialise_tabline(void);
+static LRESULT CALLBACK tabline_wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
#endif
#ifdef FEAT_MBYTE_IME
@@ -4305,10 +4307,22 @@
TOOLBAR_BUTTON_HEIGHT,
sizeof(TBBUTTON)
);
+ s_toolbar_wndproc = SubclassWindow(s_toolbarhwnd, toolbar_wndproc);
gui_mch_show_toolbar(vim_strchr(p_go, GO_TOOLBAR) != NULL);
}
+ static LRESULT CALLBACK
+toolbar_wndproc(
+ HWND hwnd,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ HandleMouseHide(uMsg, lParam);
+ return CallWindowProc(s_toolbar_wndproc, hwnd, uMsg, wParam, lParam);
+}
+
static int
get_toolbar_bitmap(vimmenu_T *menu)
{
@@ -4385,6 +4399,7 @@
WS_CHILD|TCS_FOCUSNEVER|TCS_TOOLTIPS,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, s_hwnd, NULL, s_hinst, NULL);
+ s_tabline_wndproc = SubclassWindow(s_tabhwnd, tabline_wndproc);
gui.tabline_height = TABLINE_HEIGHT;
@@ -4392,6 +4407,17 @@
set_tabline_font();
# endif
}
+
+ static LRESULT CALLBACK
+tabline_wndproc(
+ HWND hwnd,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ HandleMouseHide(uMsg, lParam);
+ return CallWindowProc(s_tabline_wndproc, hwnd, uMsg, wParam, lParam);
+}
#endif
#if defined(FEAT_OLE) || defined(FEAT_EVAL) || defined(PROTO)
diff --git a/src/gui_w48.c b/src/gui_w48.c
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -177,10 +177,12 @@
#ifdef FEAT_TOOLBAR
static HWND s_toolbarhwnd = NULL;
+static WNDPROC s_toolbar_wndproc = NULL;
#endif
#ifdef FEAT_GUI_TABLINE
static HWND s_tabhwnd = NULL;
+static WNDPROC s_tabline_wndproc = NULL;
static int showing_tabline = 0;
#endif