Utility/Win32: Fix cached position never getting updated with threaded windows

Closes #104
This commit is contained in:
Jérôme Leclercq
2016-11-04 22:57:07 +01:00
parent 12f6877963
commit 581cc989de

View File

@@ -792,12 +792,17 @@ namespace Nz
RECT windowRect; RECT windowRect;
GetWindowRect(m_handle, &windowRect); GetWindowRect(m_handle, &windowRect);
Vector2i position(windowRect.left, windowRect.top);
if (m_position != position)
{
m_position = position;
WindowEvent event; WindowEvent event;
event.type = WindowEventType_Moved; event.type = WindowEventType_Moved;
event.position.x = windowRect.left; event.position.x = position.x;
event.position.y = windowRect.top; event.position.y = position.y;
m_parent->PushEvent(event); m_parent->PushEvent(event);
}
break; break;
} }