]> git.saurik.com Git - wxWidgets.git/commitdiff
overriding the cfrunloop accessor, during booting cocoa has to create a NSRunLoop...
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 22 Apr 2010 06:16:34 +0000 (06:16 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 22 Apr 2010 06:16:34 +0000 (06:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/cocoa/evtloop.h
src/osx/carbon/evtloop.cpp
src/osx/cocoa/evtloop.mm

index 79c25c2b00f9494583d0160f859c11c6bdb75905..ed64e651ebdf6aa1afda234141509087a058b0e5 100644 (file)
@@ -22,6 +22,8 @@ protected:
     virtual void DoRun();
 
     virtual void DoStop();
+    
+    virtual CFRunLoopRef CFGetCurrentRunLoop() const;
 };
 
 #endif // _WX_OSX_COCOA_EVTLOOP_H_
index 4ca136ca90ad9eb21eba418d409cd60f6a99c24c..6ea3f85fac468748d45862f529de8107d20d91fa 100644 (file)
@@ -94,6 +94,11 @@ void wxGUIEventLoop::DoStop()
     QuitApplicationEventLoop();
 }
 
+CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
+{
+    return wxCFEventLoop::CFGetCurrentRunLoop();
+}
+
 // TODO move into a evtloop_osx.cpp
 
 wxModalEventLoop::wxModalEventLoop(wxWindow *modalWindow)
@@ -114,6 +119,7 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow)
 
 void wxModalEventLoop::DoRun()
 {
+    wxWindowDisabler disabler(m_modalWindow);
     wxMacAutoreleasePool autoreleasepool;
 
     bool resetGroupParent = false;
index bcd24e8405fd41e84156e860d81b92046094a5ae..ed35319658eb8af7a1682a4b722ba92c49bd641a 100644 (file)
@@ -175,6 +175,13 @@ void wxGUIEventLoop::DoStop()
     [NSApp stop:0];
 }
 
+CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
+{
+    NSRunLoop* nsloop = [NSRunLoop currentRunLoop];
+    return [nsloop getCFRunLoop];
+}
+
+
 // TODO move into a evtloop_osx.cpp
 
 wxModalEventLoop::wxModalEventLoop(wxWindow *modalWindow)