[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1130
Date       : Fri May 19 14:20:52 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camview.cpp
   M /Trunk/XaraLX/wxOil/ccolbar.cpp
   M /Trunk/XaraLX/wxOil/dlgmgr.cpp
   M /Trunk/XaraLX/wxOil/dragmgr.cpp

Fix files to us wxChildWindowFromPoint so we do not rely on wxWidgets bug fix
Do not use client coords in dragmgr


Diff:
Index: Trunk/XaraLX/wxOil/ccolbar.cpp
===================================================================
--- Trunk/XaraLX/wxOil/ccolbar.cpp	(revision 1129)
+++ Trunk/XaraLX/wxOil/ccolbar.cpp	(revision 1130)
@@ -5408,10 +5408,10 @@
 //	ASSERT_VALID(TheColourBar);
 	ERROR3IF(Result == NULL, _T("CColourBar::GetStatusLineText - NULL Result parameter is bad"));
 
-	wxPoint TempPos = wxGetMousePosition();
+	wxPoint TempPos = ::wxGetMousePosition();
 
 	wxPoint Pos(TempPos);
-	if (wxFindWindowAtPoint(Pos) != TheColourBar)
+	if (::wxChildWindowFromPoint(Pos, FALSE, -1) != TheColourBar)
 		return(FALSE);
 
 	Pos = TheColourBar->ScreenToClient(Pos);				// make relative to window
Index: Trunk/XaraLX/wxOil/camview.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camview.cpp	(revision 1129)
+++ Trunk/XaraLX/wxOil/camview.cpp	(revision 1130)
@@ -1864,8 +1864,8 @@
 		return OVER_NO_RULERS;
 
 	// get the mouse position in screen coords
-	wxPoint ScrMousePos;
-	wxWindow* pWindow = ::wxFindWindowAtPointer(ScrMousePos);
+	wxPoint ScrMousePos = ::wxGetMousePosition();
+	wxWindow* pWindow = ::wxChildWindowFromPoint(ScrMousePos, FALSE, -1);
 
 	// check the HWND against the rulers
 	if (pWindow == (wxWindow*)HRuler)
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 1129)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 1130)
@@ -7391,9 +7391,8 @@
 {
 	if (!ptext)
 		return FALSE;
-	wxPoint pt; // Unused
 	if (!window)
-		window=::wxFindWindowAtPointer(pt);
+		window=::wxChildWindowFromPoint(wxGetMousePosition(), FALSE, -1);
 	if (!window)
 		return FALSE;
 
@@ -7446,8 +7445,8 @@
 
 CWindowID DialogManager::GetWindowUnderPointer(WinCoord * wc /*=NULL*/)
 {
-	wxPoint pt(0,0);
-	wxWindow * w=::wxFindWindowAtPointer(pt);
+	wxPoint pt=wxGetMousePosition();
+	wxWindow * w=::wxChildWindowFromPoint(pt, FALSE, -1);
 	if (wc)
 	{
 		wc->x=pt.x;
Index: Trunk/XaraLX/wxOil/dragmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dragmgr.cpp	(revision 1129)
+++ Trunk/XaraLX/wxOil/dragmgr.cpp	(revision 1130)
@@ -1340,21 +1340,14 @@
 					TargetRect.Inside(WinoilMousePos))
 				{
 					// Determine if the pointer is over the target window, or any of its children
-					wxWindow* WindowUnderPoint = wxFindWindowAtPoint(WinoilMousePos);
+					wxWindow* WindowUnderPoint = ::wxChildWindowFromPoint(WinoilMousePos, FALSE, -1);
 					BOOL AreOverTargetWnd = (WindowUnderPoint == TargetWindow);
-
+					
 					if (!AreOverTargetWnd)
 					{
 						// We're not immediately over the background of the window, but may be over
 						// a child-window of our window! 
-
-						// Get the mouse position in client coords
-						wxPoint ClientPoint;
-						ClientPoint.x = WinoilMousePos.x;
-						ClientPoint.y = WinoilMousePos.y;
-						ClientPoint = TargetWindow->ScreenToClient(ClientPoint);
-
-						wxWindow* ChildWindowUnderPoint = ::wxChildWindowFromPoint(TargetWindow, ClientPoint);
+						wxWindow* ChildWindowUnderPoint = ::wxChildWindowFromPoint(TargetWindow, WinoilMousePos);
 						AreOverTargetWnd = (ChildWindowUnderPoint != NULL &&
 												ChildWindowUnderPoint == WindowUnderPoint);
 					}
@@ -1408,14 +1401,14 @@
 					// window (ie dont pass on events to overlapped windows) unless we want
 					// to broadcast to all, or this target really wants to know!
 					
-					wxWindow* WindowUnderPoint = wxFindWindowAtPoint(WinoilMousePos);
+					wxWindow* WindowUnderPoint = ::wxChildWindowFromPoint(WinoilMousePos, FALSE, -1);
 					BOOL AreOverTargetWnd = (WindowUnderPoint == TargetWindow);
 
 					if (!AreOverTargetWnd)
 					{
 						// We're not immediately over the background of the window, but may be over
 						// a child-window of our window! 
-						wxWindow* ChildWindowUnderPoint = ::wxChildWindowFromPoint(TargetWindow, ClientPoint);
+						wxWindow* ChildWindowUnderPoint = ::wxChildWindowFromPoint(TargetWindow, WinoilMousePos);
 						AreOverTargetWnd = (ChildWindowUnderPoint != NULL &&
 												ChildWindowUnderPoint == WindowUnderPoint);
 					}


Xara