Window: Fix Threaded flag, seems to be working fine now

This commit is contained in:
Jérôme Leclercq
2016-11-07 10:51:23 +01:00
parent 94631e1a01
commit ffe748b8c3
3 changed files with 35 additions and 30 deletions

View File

@@ -109,6 +109,7 @@ namespace Nz
{
Destroy();
m_asyncWindow = false;
m_impl = new WindowImpl(this);
if (!m_impl->Create(handle))
{
@@ -343,7 +344,7 @@ namespace Nz
LockGuard eventLock(m_eventMutex);
for (const WindowEvent& event : m_pendingEvents)
PushEvent(event);
HandleEvent(event);
m_pendingEvents.clear();
}
@@ -395,7 +396,6 @@ namespace Nz
if (!listener)
{
// Empty the event queue
LockGuard lock(m_eventMutex);
while (!m_events.empty())
m_events.pop();
}