From 1dcca9b51ebfbc1bd743918a2eb6eed37416dd13 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 3 Feb 2012 17:27:17 +0000 Subject: [PATCH 1/1] Enable callbacks for wxFileSystemWatcher FD under OS X. 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index afe67a048c..fac4858a10 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -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(); -- 2.45.2