Remove Carbon-specific code from wxScreenDC implementation

Carbon is not supported any more and defining m_overlayWindow, which was
only used by Carbon code, resulted in "unused private variable" warning
from clang.
This commit is contained in:
Vadim Zeitlin
2019-10-27 01:44:29 +02:00
parent 85b5337160
commit d38d8f4f9c
2 changed files with 0 additions and 22 deletions

View File

@@ -21,8 +21,6 @@ public:
virtual ~wxScreenDCImpl();
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const wxOVERRIDE;
private:
void* m_overlayWindow;
private:
wxDECLARE_CLASS(wxScreenDCImpl);

View File

@@ -26,37 +26,17 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl);
wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
wxWindowDCImpl( owner )
{
#if wxOSX_USE_COCOA_OR_CARBON
CGRect cgbounds ;
cgbounds = CGDisplayBounds(CGMainDisplayID());
m_width = (wxCoord)cgbounds.size.width;
m_height = (wxCoord)cgbounds.size.height;
#else
wxDisplaySize( &m_width, &m_height );
#endif
#if wxOSX_USE_COCOA_OR_IPHONE
SetGraphicsContext( wxGraphicsContext::Create() );
#else
Rect bounds;
bounds.top = (short)cgbounds.origin.y;
bounds.left = (short)cgbounds.origin.x;
bounds.bottom = bounds.top + (short)cgbounds.size.height;
bounds.right = bounds.left + (short)cgbounds.size.width;
WindowAttributes overlayAttributes = kWindowIgnoreClicksAttribute;
CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, (WindowRef*) &m_overlayWindow );
ShowWindow((WindowRef)m_overlayWindow);
SetGraphicsContext( wxGraphicsContext::CreateFromNativeWindow( m_overlayWindow ) );
#endif
m_ok = true ;
}
wxScreenDCImpl::~wxScreenDCImpl()
{
wxDELETE(m_graphicContext);
#if wxOSX_USE_COCOA_OR_IPHONE
#else
DisposeWindow((WindowRef) m_overlayWindow );
#endif
}
#if wxOSX_USE_IPHONE