mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Fixed #1151 OVQT !_Pumping assert when entering settings dialog
This commit is contained in:
parent
83f03881cf
commit
d145c48e15
3 changed files with 11 additions and 7 deletions
|
@ -1023,7 +1023,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
[_ctx flushBuffer];
|
||||
[_glView display];
|
||||
|
||||
_EventEmitter.init(this, _glView);
|
||||
_EventEmitter.init(this, _glView, _DestroyWindow);
|
||||
|
||||
#elif defined(NL_OS_UNIX)
|
||||
|
||||
|
|
|
@ -222,10 +222,12 @@ static bool isTextKeyEvent(NSEvent* event)
|
|||
return false;
|
||||
}
|
||||
|
||||
void CCocoaEventEmitter::init(NL3D::IDriver* driver, CocoaOpenGLView* glView)
|
||||
void CCocoaEventEmitter::init(
|
||||
NL3D::IDriver* driver, CocoaOpenGLView* glView, bool eventLoop)
|
||||
{
|
||||
_driver = driver;
|
||||
_glView = glView;
|
||||
_eventLoop = eventLoop;
|
||||
}
|
||||
|
||||
bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server)
|
||||
|
@ -443,7 +445,8 @@ typedef bool (*cocoaProc)(NL3D::IDriver*, const void* e);
|
|||
void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
||||
{
|
||||
// break if there was no event to handle
|
||||
while(true)
|
||||
// if running embedded in e.g. qt, _eventLoop will be false
|
||||
while(_eventLoop)
|
||||
{
|
||||
// get the next event to handle
|
||||
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
|
|
|
@ -34,6 +34,7 @@ class CCocoaEventEmitter : public IEventEmitter
|
|||
{
|
||||
bool _emulateRawMode;
|
||||
bool _setToEmulateRawMode;
|
||||
bool _eventLoop;
|
||||
NL3D::IDriver* _driver;
|
||||
CocoaOpenGLView* _glView;
|
||||
|
||||
|
@ -48,7 +49,7 @@ public:
|
|||
_glView(nil),
|
||||
_server(NULL) { }
|
||||
|
||||
void init(NL3D::IDriver* driver, CocoaOpenGLView* glView);
|
||||
void init(NL3D::IDriver*, CocoaOpenGLView*, bool eventLoop);
|
||||
bool processMessage(NSEvent* event, CEventServer* server = NULL);
|
||||
virtual void submitEvents(CEventServer& server, bool allWindows);
|
||||
virtual void emulateMouseRawMode(bool enable);
|
||||
|
|
Loading…
Reference in a new issue