cursor handling fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-06-25 11:18:02 +00:00
parent 90ff87d7b0
commit 2d1760d30f

View File

@@ -1416,27 +1416,30 @@ bool wxWindowMac::SetCursor(const wxCursor& cursor)
wxASSERT_MSG( m_cursor.Ok(),
wxT("cursor must be valid after call to the base version"));
/*
TODO why do we have to use current coordinates ?
Point pt ;
wxWindowMac *mouseWin ;
GetMouse( &pt ) ;
// Change the cursor NOW if we're within the correct window
if ( MacGetWindowFromPoint( wxPoint( pt.h , pt.v ) , &mouseWin ) )
wxWindowMac *mouseWin = 0 ;
{
if ( mouseWin == this && !wxIsBusy() )
{
m_cursor.MacInstall() ;
}
WindowRef window = (WindowRef) MacGetTopLevelWindowRef() ;
CGrafPtr savePort ;
Boolean swapped = QDSwapPort( GetWindowPort( window ) , &savePort ) ;
// TODO If we ever get a GetCurrentEvent.. replacement for the mouse
// position, use it...
Point pt ;
GetMouse( &pt ) ;
ControlPartCode part ;
ControlRef control ;
control = wxMacFindControlUnderMouse( pt , window , &part ) ;
if ( control )
mouseWin = wxFindControlFromMacControl( control ) ;
if ( swapped )
QDSwapPort( savePort , NULL ) ;
}
*/
if ( !wxIsBusy() )
if ( mouseWin == this && !wxIsBusy() )
{
m_cursor.MacInstall() ;
}