fixed condition that could cause 2 windows to look focused, and bad things to occur

This commit is contained in:
Dana Jansens 2003-01-07 05:21:12 +00:00
parent 9d2ba8205c
commit eccab56a6c

View file

@ -1081,10 +1081,12 @@ void OBClient::shade(bool shade)
bool OBClient::focus() 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) if (_can_focus)
XSetInputFocus(otk::OBDisplay::display, _window, RevertToNone, CurrentTime); XSetInputFocus(otk::OBDisplay::display, _window,
RevertToNone, CurrentTime);
if (_focus_notify) { if (_focus_notify) {
XEvent ce; XEvent ce;