]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/classic/display.cpp
Compilation fixes.
[wxWidgets.git] / src / mac / classic / display.cpp
index 61eb2d44e2f4107d0faf55d30af30c2517573dcc..069570e5d104fba134d95741a8674d4830ba52f1 100644 (file)
 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(); }
@@ -120,12 +124,14 @@ int wxDisplayFactoryMac::GetFromPoint(const wxPoint &p)
 
 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);