@@ -616,13 +616,12 @@ static void DispatchLeftClickEvent(Windo
/* If clicked on a window that previously did dot have focus */
if (_focused_window != w && // We already have focus, right?
(w->window_desc->flags & WDF_NO_FOCUS) == 0 && // Don't lose focus to toolbars
widget_type != WWT_CLOSEBOX) { // Don't change focused window if 'X' (close button) was clicked
focused_widget_changed = true;
SetFocusedWindow(w);
w->OnFocus();
}
if (nw == NULL) return; // exit if clicked outside of widgets
/* don't allow any interaction if the button has been disabled */
if (nw->IsDisabled()) return;
Status change: