X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50d4763f1710f6e45ac6af7112d1ce9effe93bc4..48e05747043db02c4e9d2e286eca4fdf5dee7881:/src/osx/cocoa/evtloop.mm diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index 0228697ebd..135f936de5 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -109,6 +109,7 @@ wxGUIEventLoop::wxGUIEventLoop() m_dummyWindow = nil; m_modalNestedLevel = 0; m_modalWindow = NULL; + m_osxLowLevelWakeUp = false; } wxGUIEventLoop::~wxGUIEventLoop() @@ -255,11 +256,14 @@ void wxGUIEventLoop::DoStop() void wxGUIEventLoop::WakeUp() { - NSEvent* cevent = [NSApp currentEvent]; + // 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] < NSKeyDown ) + // if ( cevent != nil && [cevent type] <= NSMouseMoved && ) + if ( m_osxLowLevelWakeUp /* [NSEventTrackingRunLoopMode isEqualToString:mode] */ ) { + // NSLog(@"event for wakeup %@ in mode %@",cevent,mode); wxCFEventLoop::WakeUp(); } else @@ -456,5 +460,4 @@ wxWindowDisabler::~wxWindowDisabler() } delete m_winDisabled; -} - +} \ No newline at end of file