git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70684
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxGUIEventLoop::Dispatch()
{
if ( !wxTheApp )
bool wxGUIEventLoop::Dispatch()
{
if ( !wxTheApp )
void wxGUIEventLoop::WakeUp()
{
void wxGUIEventLoop::WakeUp()
{
- wxMacAutoreleasePool autoreleasepool;
- NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
+ NSEvent* cevent = [NSApp currentEvent];
+
+ // when already in a mouse event handler, don't add higher level event
+ if ( cevent != nil && [cevent type] < NSKeyDown )
+ {
+ 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];
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
}
CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const