DolphinQt/RenderWidget: Grab focus on mouse button press.

This commit is contained in:
Jordan Woyak
2025-05-20 21:05:55 -05:00
parent 1dc4dc6b6d
commit f1b7f8a72e

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).