From 7b3a00878c4bde34d64c3af800bea089760f9bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karsten=20Ball=C3=BCder?= Date: Mon, 10 Aug 1998 09:21:28 +0000 Subject: [PATCH] added correct coordinate handling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- user/wxLayout/wxlwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/user/wxLayout/wxlwindow.cpp b/user/wxLayout/wxlwindow.cpp index e8dff1fdc3..f20a7374fb 100644 --- a/user/wxLayout/wxlwindow.cpp +++ b/user/wxLayout/wxlwindow.cpp @@ -33,8 +33,13 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event) if(m_EventId == 0) // nothing to do return; - m_FindPos.x = event.GetX(); - m_FindPos.y = event.GetY(); + // this is unintuitive + wxClientDC dc(this); + PrepareDC( dc ); + + m_FindPos.x = dc.DeviceToLogicalX( event.GetX() ); + m_FindPos.y = dc.DeviceToLogicalY( event.GetY() ); + m_FoundObject = NULL; #ifdef WXLAYOUT_DEBUG