Remove unnecessary Mac-specific IsShownOnScreen() implementation
It ended up returning the result of the base class method anyhow, just after doing a lot of unnecessary work, so this commit shouldn't change anything, but should significantly speed up this function. We may want to explore the possibility of implementing this method natively using GetPeer()->IsVisible() later, as it could be faster than our own implementation, but we need to ensure that this always returns the same result as before, which might not be the case when the TLW is in the process of being shown or hidden, so don't do this for now. Closes https://github.com/wxWidgets/wxWidgets/pull/1911 Closes #18645.
This commit is contained in:
@@ -72,8 +72,6 @@ public:
|
|||||||
return OSXShowWithEffect(false, effect, timeout);
|
return OSXShowWithEffect(false, effect, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool IsShownOnScreen() const wxOVERRIDE;
|
|
||||||
|
|
||||||
virtual void SetFocus() wxOVERRIDE;
|
virtual void SetFocus() wxOVERRIDE;
|
||||||
|
|
||||||
virtual void WarpPointer( int x, int y ) wxOVERRIDE;
|
virtual void WarpPointer( int x, int y ) wxOVERRIDE;
|
||||||
|
@@ -2418,29 +2418,6 @@ wxByte wxWindowMac::GetTransparent() const
|
|||||||
return m_macAlpha ;
|
return m_macAlpha ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindowMac::IsShownOnScreen() const
|
|
||||||
{
|
|
||||||
if ( GetPeer() && GetPeer()->IsOk() )
|
|
||||||
{
|
|
||||||
bool peerVis = GetPeer()->IsVisible();
|
|
||||||
bool wxVis = wxWindowBase::IsShownOnScreen();
|
|
||||||
if( peerVis != wxVis )
|
|
||||||
{
|
|
||||||
// CS : put a breakpoint here to investigate differences
|
|
||||||
// between native an wx visibilities
|
|
||||||
// the only place where I've encountered them until now
|
|
||||||
// are the hiding/showing sequences where the vis-changed event is
|
|
||||||
// first sent to the innermost control, while wx does things
|
|
||||||
// from the outmost control
|
|
||||||
wxVis = wxWindowBase::IsShownOnScreen();
|
|
||||||
return wxVis;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetPeer()->IsVisible();
|
|
||||||
}
|
|
||||||
return wxWindowBase::IsShownOnScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
|
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
|
||||||
|
|
||||||
OSStatus
|
OSStatus
|
||||||
|
Reference in New Issue
Block a user