m_dummyWindow = nil;
m_modalNestedLevel = 0;
m_modalWindow = NULL;
+ m_osxLowLevelWakeUp = false;
}
wxGUIEventLoop::~wxGUIEventLoop()
#endif
}
+
bool wxGUIEventLoop::Dispatch()
{
if ( !wxTheApp )
void wxGUIEventLoop::WakeUp()
{
- wxMacAutoreleasePool autoreleasepool;
- NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
+ // NSEvent* cevent = [NSApp currentEvent];
+ // NSString* mode = [[NSRunLoop mainRunLoop] currentMode];
+
+ // when already in a mouse event handler, don't add higher level event
+ // if ( cevent != nil && [cevent type] <= NSMouseMoved && )
+ if ( m_osxLowLevelWakeUp /* [NSEventTrackingRunLoopMode isEqualToString:mode] */ )
+ {
+ // NSLog(@"event for wakeup %@ in mode %@",cevent,mode);
+ wxCFEventLoop::WakeUp();
+ }
+ else
+ {
+ wxMacAutoreleasePool autoreleasepool;
+ NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
location:NSMakePoint(0.0, 0.0)
modifierFlags:0
timestamp:0
windowNumber:0
context:nil
subtype:0 data1:0 data2:0];
- [NSApp postEvent:event atStart:FALSE];
+ [NSApp postEvent:event atStart:FALSE];
+ }
}
CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
}
delete m_winDisabled;
-}
-
+}
\ No newline at end of file