summaryrefslogtreecommitdiff
path: root/src/client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cc')
-rw-r--r--src/client.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client.cc b/src/client.cc
index 8386ef59..72a98afb 100644
--- a/src/client.cc
+++ b/src/client.cc
@@ -1081,10 +1081,12 @@ void OBClient::shade(bool shade)
bool OBClient::focus()
{
- if (!(_can_focus || _focus_notify) || _focused) return false;
+ if (!(_can_focus || _focus_notify)) return false;
+ if (_focused) return true;
if (_can_focus)
- XSetInputFocus(otk::OBDisplay::display, _window, RevertToNone, CurrentTime);
+ XSetInputFocus(otk::OBDisplay::display, _window,
+ RevertToNone, CurrentTime);
if (_focus_notify) {
XEvent ce;