mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
DolphinQt/RenderWidget: Grab focus on mouse button press.
This commit is contained in:
parent
1dc4dc6b6d
commit
f1b7f8a72e
1 changed files with 4 additions and 0 deletions
|
@ -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).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue