Merge pull request #13693 from jordan-woyak/focus-render-window-on-click

DolphinQt/RenderWidget: Grab focus on mouse button press.
This commit is contained in:
Admiral H. Curtiss 2025-05-21 20:28:58 +02:00 committed by GitHub
commit a6bc251677
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -384,6 +384,10 @@ bool RenderWidget::event(QEvent* event)
SetCursorLocked(false);
break;
case QEvent::MouseButtonPress:
// Grab focus to stop unwanted keyboard input UI interaction.
setFocus();
if (isActiveWindow())
{
// Lock the cursor with any mouse button click (behave the same as window focus change).