1
0
Fork 0

Platform/Unix/X11Mouse.cpp: in isButtonDown() check if we have a focused window.

This commit is contained in:
Henrik Hautakoski 2020-12-20 16:28:25 +01:00
parent f71cfa86f2
commit 6c96a3d9a1

View file

@ -39,6 +39,12 @@ Vector2f X11Mouse::getAbsPosition() const
bool X11Mouse::isButtonDown(Mouse::Button button) const
{
// Only signal that a button is down
// if we have focus on a window.
if (!m_win) {
return false;
}
// TODO: Button1 and 2 is defined in x11 and
// therefore clashes with Mouse::Button::Button1 and 2.
switch(button) {