adding a app-defined event seems to quit inner eventloops like eg the popup of the combobox, therefore use the cf api in this case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -143,6 +143,7 @@ bool wxGUIEventLoop::Pending() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxGUIEventLoop::Dispatch()
|
bool wxGUIEventLoop::Dispatch()
|
||||||
{
|
{
|
||||||
if ( !wxTheApp )
|
if ( !wxTheApp )
|
||||||
@@ -253,6 +254,15 @@ void wxGUIEventLoop::DoStop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxGUIEventLoop::WakeUp()
|
void wxGUIEventLoop::WakeUp()
|
||||||
|
{
|
||||||
|
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;
|
wxMacAutoreleasePool autoreleasepool;
|
||||||
NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
|
NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
|
||||||
@@ -264,6 +274,7 @@ void wxGUIEventLoop::WakeUp()
|
|||||||
subtype:0 data1:0 data2:0];
|
subtype:0 data1:0 data2:0];
|
||||||
[NSApp postEvent:event atStart:FALSE];
|
[NSApp postEvent:event atStart:FALSE];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
|
CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user