make sure we can issue a WakeUp call that really triggers at the NSRunLoop level not only only CFRunLoop
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,6 +21,8 @@ public:
|
|||||||
|
|
||||||
void EndModalSession();
|
void EndModalSession();
|
||||||
|
|
||||||
|
virtual void WakeUp();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||||
|
|
||||||
|
@@ -246,9 +246,14 @@ void wxGUIEventLoop::DoRun()
|
|||||||
|
|
||||||
void wxGUIEventLoop::DoStop()
|
void wxGUIEventLoop::DoStop()
|
||||||
{
|
{
|
||||||
[NSApp stop:0];
|
|
||||||
// only calling stop: is not enough when called from a runloop-observer,
|
// only calling stop: is not enough when called from a runloop-observer,
|
||||||
// therefore add a dummy event, to make sure the runloop gets another round
|
// therefore add a dummy event, to make sure the runloop gets another round
|
||||||
|
[NSApp stop:0];
|
||||||
|
WakeUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxGUIEventLoop::WakeUp()
|
||||||
|
{
|
||||||
NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
|
NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
|
||||||
location:NSMakePoint(0.0, 0.0)
|
location:NSMakePoint(0.0, 0.0)
|
||||||
modifierFlags:0
|
modifierFlags:0
|
||||||
|
Reference in New Issue
Block a user