]> git.saurik.com Git - wxWidgets.git/commitdiff
Enable callbacks for wxFileSystemWatcher FD under OS X.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Feb 2012 17:27:17 +0000 (17:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Feb 2012 17:27:17 +0000 (17:27 +0000)
We need to enable callbacks to get them initially, otherwise no events are
ever detected.

Closes #13919.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/core/evtloop_cf.cpp

index afe67a048c4a787f8495cde12cf2f3272b7a9638..fac4858a10a0d2b757f0712d317fd99c53ab9983 100644 (file)
@@ -115,6 +115,9 @@ wxCFEventLoop::AddSourceForFD(int fd,
     CFRunLoopRef cfloop = CFGetCurrentRunLoop();
     CFRunLoopAddSource(cfloop, cfsrc, kCFRunLoopDefaultMode);
 
+    // Enable the callbacks initially.
+    EnableDescriptorCallBacks(cffd, source->GetFlags());
+
     source->SetFileDescriptor(cffd.release());
 
     return source.release();