UI: Linux - Tweak previous fix for menu focus to make it work correctly in some rarer scenarios

This commit is contained in:
Sour 2025-03-02 10:51:53 +09:00
parent f9e4232105
commit 8d190963da

View file

@ -315,7 +315,7 @@ namespace Mesen.Windows
if(!evtParams.IsPowerCycle) {
Dispatcher.UIThread.Post(() => {
_model.RecentGames.Visible = false;
if(IsKeyboardFocusWithin || IsActive) {
if(IsKeyboardFocusWithin || IsActive || ApplicationHelper.GetActiveOrMainWindow() == this) {
this.GetControl<Panel>("RendererPanel").Focus();
}