]> git.saurik.com Git - wxWidgets.git/commitdiff
use TTF_TRANSPARENT to fix problem with flashing tooltips (patch 1821229)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Oct 2007 00:38:57 +0000 (00:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Oct 2007 00:38:57 +0000 (00:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/tooltip.cpp

index 98ef64a1b81f6180fc7c9db8cdb881d04e6c729b..2fec32201250067472ed02ac641a4687b7c11fcb 100644 (file)
@@ -90,6 +90,17 @@ public:
         hwnd = hwndOwner;
         uFlags = TTF_IDISHWND;
 
+        // we use TTF_TRANSPARENT to fix a problem which arises at least with
+        // the text controls but may presumably happen with other controls
+        // which display the tooltip at mouse position: it can start flashing
+        // then as the control gets "focus lost" events and dismisses the
+        // tooltip which then reappears because mouse remains hovering over the
+        // control, see SF patch 1821229
+        if ( wxApp::GetComCtl32Version() >= 470 )
+        {
+            uFlags |= TTF_TRANSPARENT;
+        }
+
         uId = (UINT)hwndOwner;
     }
 };