From abefaa5dd24c43d7d0f1f1423d47bc5e3e5778bf Mon Sep 17 00:00:00 2001 From: Noel Borthwick Date: Thu, 22 Apr 1999 15:22:06 +0000 Subject: [PATCH] Fixed bug with tooltips stealing focus whenever a tooltip was created, shown, hidden or tracked. The SetWindowPos calls needed to have the SWP_NOACTIVATE flag set additionally. --- dlls/comctl32/tooltips.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index ab337dd5f7e..bb655e94b27 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -253,7 +253,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, - SWP_SHOWWINDOW); + SWP_SHOWWINDOW | SWP_NOACTIVATE); /* repaint the tooltip */ hdc = GetDC (hwnd); @@ -286,7 +286,7 @@ TOOLTIPS_Hide (HWND hwnd, TOOLTIPS_INFO *infoPtr) infoPtr->nCurrentTool = -1; SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, - SWP_NOZORDER | SWP_HIDEWINDOW); + SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE); } @@ -370,7 +370,7 @@ TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr) SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, - SWP_SHOWWINDOW); + SWP_SHOWWINDOW | SWP_NOACTIVATE ); hdc = GetDC (hwnd); TOOLTIPS_Refresh (hwnd, hdc); @@ -397,7 +397,7 @@ TOOLTIPS_TrackHide (HWND hwnd, TOOLTIPS_INFO *infoPtr) (WPARAM)toolPtr->uId, (LPARAM)&hdr); SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, - SWP_NOZORDER | SWP_HIDEWINDOW); + SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE); } @@ -1864,7 +1864,7 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) else FIXME (tooltips, " -- WM_NOTIFYFORMAT returns: error!\n"); - SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_HIDEWINDOW); + SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE); return 0; }