﻿--- E:/Eigene Dateien/RAD Studio/Projekte/repository/3rdparty/jedi-svn/jvcl/run/JvDockVSNetStyle.pas	Tue Jun 08 16:00:08 2010
+++ E:/Eigene Dateien/RAD Studio/Projekte/repository/3rdparty/Weaver/jvcl/run/JvDockVSNetStyle.pas	Mon Mar 29 12:30:30 2010
@@ -2532,11 +2532,11 @@
       LStyle := GetWindowLong(Handle, GWL_STYLE);
       Result := WS_POPUP and LSTYLE <> 0;
     end;
   end;
 
-  function PointIsOnPopup(P: TPoint; GlobalCheck: Boolean): Boolean;
+  function PointIsOnPopup(P: TPoint; GlobalCheck: Boolean; Recurse: Boolean): Boolean;
   const
     GW_ENABLEDPOPUP = 6;
   var
     Control: TWinControl;
     Handle: HWND;
@@ -2559,21 +2559,21 @@
           Handle := GetTopWindow(GetDesktopWindow);
           ActivePopupWindow := IsPopupWindow(Handle);
         end;
       end;
 
-      if ActivePopupWindow then
+      if Recurse and ActivePopupWindow then
       begin
         GetWindowRect(Handle, Rect);
         // Search for a control one pixel to the left;
         Dec(Rect.Left);
-        Result := PointIsOnPopup(Rect.TopLeft, False);
+        Result := PointIsOnPopup(Rect.TopLeft, False, False);
         if not Result then
         begin
           // Search for a control one pixel to the Right;
           Inc(Rect.Right);
-          Result := PointIsOnPopup(Point(Rect.Right, Rect.Top), False);
+          Result := PointIsOnPopup(Point(Rect.Right, Rect.Top), False, False);
         end;
       end;
     end;
   end;
 
@@ -2585,11 +2585,11 @@
   if (csDesigning in ComponentState) or not ChannelOption.MouseleaveHide or
      ((GetAsyncKeyState(VK_LBUTTON) and $8000) <> 0) then
     Exit;
 
   GetCursorPos(P);
-  if PointIsOnPopup(P, True) then
+  if PointIsOnPopup(P, True, True) then
   begin
     { Reset timer }
     FCurrentTimer := ChannelOption.HideHoldTime;
     Exit;
   end;
