fixed initial focus display

This commit is contained in:
thrust26 2020-11-13 14:24:52 +01:00
parent 0532bc824a
commit 264eb5ea1a
3 changed files with 14 additions and 13 deletions

View File

@ -324,6 +324,7 @@ void EventHandler::handleSystemEvent(SystemEvent e, int, int)
case SystemEvent::WINDOW_EXPOSED:
case SystemEvent::WINDOW_RESIZED:
//myOSystem.frameBuffer().update(true); // force full update
// TODO: test and maybe force a render update instead
myOSystem.frameBuffer().update();
break;
#ifdef BSPF_UNIX

View File

@ -476,17 +476,6 @@ void Dialog::drawDialog()
clearDirty();
}
// Draw outlines for focused widgets
// Don't change focus, since this will trigger lost and received
// focus events
if(_focusedWidget)
{
_focusedWidget = Widget::setFocusForChain(this, getFocusList(),
_focusedWidget, 0, false);
// if(_focusedWidget)
// _focusedWidget->draw(); // make sure the highlight color is drawn initially
}
Widget* w = _firstWidget;
// Draw all children
@ -498,6 +487,17 @@ void Dialog::drawDialog()
w->draw();
w = w->_next;
}
// Draw outlines for focused widgets
// Don't change focus, since this will trigger lost and received
// focus events
if(_focusedWidget)
{
_focusedWidget = Widget::setFocusForChain(this, getFocusList(),
_focusedWidget, 0, false);
//if(_focusedWidget)
// _focusedWidget->draw(); // make sure the highlight color is drawn initially
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -269,7 +269,7 @@ Widget* Widget::setFocusForChain(GuiObject* boss, WidgetArray& arr,
s.frameRect(x, y, w, h, onTop ? kDlgColor : kBGColorLo);
tmp->setDirty();
//tmp->setDirty();
}
}
@ -325,7 +325,7 @@ Widget* Widget::setFocusForChain(GuiObject* boss, WidgetArray& arr,
if (onTop)
s.frameRect(x, y, w, h, kWidFrameColor, FrameStyle::Dashed);
tmp->setDirty();
//tmp->setDirty();
return tmp;
}