From eccab56a6c06c9c2f5764d7913fd794961f60214 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 7 Jan 2003 05:21:12 +0000 Subject: [PATCH] fixed condition that could cause 2 windows to look focused, and bad things to occur --- src/client.cc | 6 ++++-- 1 file 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; -- 2.39.2