#if wxUSE_DISPLAY
+#include "wx/display.h"
+
#ifndef WX_PRECOMP
- #include "wx/dynarray.h"
- #include "wx/log.h"
+ #include "wx/dynarray.h"
+ #include "wx/log.h"
+ #include "wx/string.h"
#endif
#ifdef __DARWIN__
#include <FixMath.h>
#endif
-#include "wx/display.h"
#include "wx/display_impl.h"
#include "wx/gdicmn.h"
-#include "wx/string.h"
// ----------------------------------------------------------------------------
// display implementation classes
class wxDisplayImplMac : public wxDisplayImpl
{
public:
- wxDisplayImplMac(GDHandle hndl) : m_hndl(hndl) { }
+ wxDisplayImplMac(size_t n, GDHandle hndl)
+ : wxDisplayImpl(n),
+ m_hndl(hndl)
+ {
+ }
virtual wxRect GetGeometry() const;
virtual wxString GetName() const { return wxString(); }
wxDisplayImpl *wxDisplayFactoryMac::CreateDisplay(size_t n)
{
+ size_t nOrig = n;
+
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
if (n == 0)
{
- return new wxDisplayImplMac(hndl);
+ return new wxDisplayImplMac(nOrig, hndl);
}
n--;
hndl = DMGetNextScreenDevice(hndl, true);