mirror of https://github.com/PCSX2/pcsx2.git
GSFrame: Pass focus to GSPanel once Frame receives focus
Passing focus on the focus message instead of the activate message resolves an issue where external processes (e.g. NVIDIA overlay) forced a focus change to the GS Frame, requiring the window to be refocused in order for keyboard inputs to work again. Currently, GSFrame rejects focus messages and instead passes it to the child GSPanel.
This commit is contained in:
parent
f7966bd213
commit
a4057d569f
|
@ -565,7 +565,7 @@ GSFrame::GSFrame( const wxString& title)
|
|||
Bind(wxEVT_CLOSE_WINDOW, &GSFrame::OnCloseWindow, this);
|
||||
Bind(wxEVT_MOVE, &GSFrame::OnMove, this);
|
||||
Bind(wxEVT_SIZE, &GSFrame::OnResize, this);
|
||||
Bind(wxEVT_ACTIVATE, &GSFrame::OnActivate, this);
|
||||
Bind(wxEVT_SET_FOCUS, &GSFrame::OnFocus, this);
|
||||
|
||||
Bind(wxEVT_TIMER, &GSFrame::OnUpdateTitle, this, m_timer_UpdateTitle.GetId());
|
||||
}
|
||||
|
@ -799,11 +799,11 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
|
|||
SetTitle(title);
|
||||
}
|
||||
|
||||
void GSFrame::OnActivate( wxActivateEvent& evt )
|
||||
void GSFrame::OnFocus( wxFocusEvent& evt )
|
||||
{
|
||||
if( IsBeingDeleted() ) return;
|
||||
|
||||
evt.Skip();
|
||||
evt.Skip(false); // Reject the focus message, as we pass focus to the child
|
||||
if( wxWindow* gsPanel = GetViewport() ) gsPanel->SetFocus();
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ protected:
|
|||
void OnCloseWindow( wxCloseEvent& evt );
|
||||
void OnMove( wxMoveEvent& evt );
|
||||
void OnResize( wxSizeEvent& evt );
|
||||
void OnActivate( wxActivateEvent& evt );
|
||||
void OnFocus( wxFocusEvent& evt );
|
||||
void OnUpdateTitle( wxTimerEvent& evt );
|
||||
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
|
|
Loading…
Reference in New Issue