Nav stack cleanup (#1460)

* Minor nav stack fixes
* Nav stack cleanup
* Additional cleanup, fix notepad crash
* Fix abort/cancel
* Fix for nasty focus bug
* Format
This commit is contained in:
Kyle Reed 2023-09-27 12:03:02 -07:00 committed by GitHub
parent a6a1483083
commit fb00bfac3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 116 additions and 185 deletions

View file

@ -43,18 +43,12 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) {
}
if (new_focus_widget) {
// if( !new_focus_widget->visible() ) {
// if( new_focus_widget->hidden() ) {
// // New widget is not visible. Do nothing.
// // TODO: Should this be a debug assertion?
// return;
// }
if (!new_focus_widget->focusable()) {
if (!new_focus_widget->focusable())
return;
}
}
// Blur old widget.
// NB: This will crash if the focus_widget is a destroyed instance.
if (focus_widget()) {
focus_widget()->on_blur();
focus_widget()->set_dirty();