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

View File

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