]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_display.i
Use default window IDs
[wxWidgets.git] / wxPython / src / _display.i
index 04ad8453013bd6446f90db889a7639b6b2f5e345..433e5762cb9bb97b43cbbc0a9d83b4734e5d2061 100644 (file)
@@ -163,14 +163,14 @@ platform.");
         PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) {
             PyObject* pyList = NULL;
             wxArrayVideoModes arr = self->GetModes(mode);
-            wxPyBeginBlockThreads();
+            bool blocked = wxPyBeginBlockThreads();
             pyList = PyList_New(0);
             for (int i=0; i < arr.GetCount(); i++) {
                 wxVideoMode* m = new wxVideoMode(arr.Item(i));
                 PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
                 PyList_Append(pyList, pyObj);
             }
-            wxPyEndBlockThreads();
+            wxPyEndBlockThreads(blocked);
             return pyList;
         }
     }