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();