CtrlCore: X11 TakeFocus fix (thanks mrjt)

git-svn-id: svn://ultimatepp.org/upp/trunk@1690 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-11-10 22:19:51 +00:00
parent 7719c80979
commit 2c3bb2d1bb

View file

@ -836,9 +836,10 @@ void Ctrl::TakeFocus()
return;
}
LLOG("TAKE_FOCUS " << Name());
ClearKbdState_();
if(IsEnabled() && IsVisible() && top->window != GetXServerFocusWindow())
if(IsEnabled() && IsVisible() && top->window != GetXServerFocusWindow()) {
ClearKbdState_();
SetWndFocus();
}
if(this != focusCtrlWnd) {
if(IsEnabled()) {
SetLastActive(w, this);