diff --git a/source/Platform/Unix/X11Mouse.cpp b/source/Platform/Unix/X11Mouse.cpp index 850eec0..9ef045a 100644 --- a/source/Platform/Unix/X11Mouse.cpp +++ b/source/Platform/Unix/X11Mouse.cpp @@ -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) {