]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
fixed condition that could cause 2 windows to look focused, and bad things to occur
[chaz/openbox] / src / client.cc
index 8386ef592cc5bed38d04f5a06ef466cd979ef9b1..72a98afbf7338f4602494380ac214abbb525683e 100644 (file)
@@ -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;
This page took 0.01948 seconds and 4 git commands to generate.