mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
DolphinQt/RenderWidget: Grab focus on mouse button press.
This commit is contained in:
@ -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).
|
||||
|
Reference in New Issue
Block a user