since DoScreenToClient and ClientToScreen in toplvlcmn are implemented by calling the superclass implementation, we have to avoid shifting by the client origin twice. had to change MacWindowFromPoint therefore too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
42c95b077f
commit
2078220ed6
@ -350,14 +350,23 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const
|
||||
if(x) *x = localwhere.h ;
|
||||
if(y) *y = localwhere.v ;
|
||||
|
||||
MacRootWindowToClient( x , y ) ;
|
||||
MacRootWindowToWindow( x , y ) ;
|
||||
if ( x )
|
||||
x -= MacGetLeftBorderSize() ;
|
||||
if ( y )
|
||||
y -= MacGetTopBorderSize() ;
|
||||
}
|
||||
|
||||
void wxWindowMac::DoClientToScreen(int *x, int *y) const
|
||||
{
|
||||
WindowRef window = (WindowRef) MacGetRootWindow() ;
|
||||
|
||||
MacClientToRootWindow( x , y ) ;
|
||||
if ( x )
|
||||
x += MacGetLeftBorderSize() ;
|
||||
if ( y )
|
||||
y += MacGetTopBorderSize() ;
|
||||
|
||||
MacWindowToRootWindow( x , y ) ;
|
||||
|
||||
Point localwhere = { 0,0 };
|
||||
if(x) localwhere.h = * x ;
|
||||
@ -1349,6 +1358,7 @@ bool wxWindowMac::MacGetWindowFromPoint( const wxPoint &screenpoint , wxWindowMa
|
||||
if ( win )
|
||||
{
|
||||
point = win->ScreenToClient( point ) ;
|
||||
point += win->GetClientAreaOrigin() ;
|
||||
return win->MacGetWindowFromPointSub( point , outWin ) ;
|
||||
}
|
||||
}
|
||||
|
@ -350,14 +350,23 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const
|
||||
if(x) *x = localwhere.h ;
|
||||
if(y) *y = localwhere.v ;
|
||||
|
||||
MacRootWindowToClient( x , y ) ;
|
||||
MacRootWindowToWindow( x , y ) ;
|
||||
if ( x )
|
||||
x -= MacGetLeftBorderSize() ;
|
||||
if ( y )
|
||||
y -= MacGetTopBorderSize() ;
|
||||
}
|
||||
|
||||
void wxWindowMac::DoClientToScreen(int *x, int *y) const
|
||||
{
|
||||
WindowRef window = (WindowRef) MacGetRootWindow() ;
|
||||
|
||||
MacClientToRootWindow( x , y ) ;
|
||||
if ( x )
|
||||
x += MacGetLeftBorderSize() ;
|
||||
if ( y )
|
||||
y += MacGetTopBorderSize() ;
|
||||
|
||||
MacWindowToRootWindow( x , y ) ;
|
||||
|
||||
Point localwhere = { 0,0 };
|
||||
if(x) localwhere.h = * x ;
|
||||
@ -1349,6 +1358,7 @@ bool wxWindowMac::MacGetWindowFromPoint( const wxPoint &screenpoint , wxWindowMa
|
||||
if ( win )
|
||||
{
|
||||
point = win->ScreenToClient( point ) ;
|
||||
point += win->GetClientAreaOrigin() ;
|
||||
return win->MacGetWindowFromPointSub( point , outWin ) ;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user