source/Platform/Win32/Win32Mouse.cpp: in update() call GetActiveWindow() instead of GetCapture()
We want the currently focused window whether it is captured or not.
This commit is contained in:
parent
ea763a9f38
commit
f6c44a223b
1 changed files with 3 additions and 2 deletions
|
|
@ -64,9 +64,10 @@ void Win32Mouse::update(InputModule *input)
|
||||||
m_abs_position = Vector2f(p.x, p.y);
|
m_abs_position = Vector2f(p.x, p.y);
|
||||||
|
|
||||||
// Update relative position
|
// Update relative position
|
||||||
handle = ::GetCapture();
|
// Get the active window.
|
||||||
|
handle = ::GetActiveWindow();
|
||||||
if (handle) {
|
if (handle) {
|
||||||
// Translate position to focued window.
|
// Translate position to the active window.
|
||||||
ScreenToClient(handle, &p);
|
ScreenToClient(handle, &p);
|
||||||
m_position = Vector2f(p.x, p.y);
|
m_position = Vector2f(p.x, p.y);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue