Tidy up focus management for vehicle dropdowns

This commit is contained in:
Jonathan G Rennison
2024-02-20 00:01:44 +00:00
parent fc2f746b80
commit 40f5f17e32
7 changed files with 32 additions and 32 deletions

View File

@@ -429,6 +429,8 @@ void SetFocusedWindow(Window *w)
{
if (_focused_window == w) return;
if (w != nullptr && w->window_class == WC_INVALID) return;
/* Invalidate focused widget */
if (_focused_window != nullptr) {
if (_focused_window->nested_focus != nullptr) _focused_window->nested_focus->SetDirty(_focused_window);