]> Dogcows Code - chaz/openbox/commitdiff
fixed condition that could cause 2 windows to look focused, and bad things to occur
authorDana Jansens <danakj@orodu.net>
Tue, 7 Jan 2003 05:21:12 +0000 (05:21 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 7 Jan 2003 05:21:12 +0000 (05:21 +0000)
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.029153 seconds and 4 git commands to generate.