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
1 changed files with 10 additions and 5 deletions

View File

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