Make sure mouse button state is 'up' after window resize.

This commit is contained in:
Dario Manesku 2015-03-06 01:59:41 +01:00
parent f47bd56d52
commit c5943ded12

View file

@ -372,6 +372,12 @@ namespace entry
uint32_t width = uint32_t(rect.size.width);
uint32_t height = uint32_t(rect.size.height);
m_eventQueue.postSizeEvent(handle, width, height);
// Make sure mouse button state is 'up' after resize.
int x, y;
getMousePos(&x, &y);
m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Left, false);
m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Right, false);
}
int32_t run(int _argc, char** _argv)