Platform/Unix/X11Mouse.cpp: in isButtonDown() check if we have a focused window.
This commit is contained in:
parent
f71cfa86f2
commit
6c96a3d9a1
1 changed files with 6 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue