Bug: fix unhide on mouse movement only responding to clicks
Previously the unhide of movement mouse_timer reset occurred within case MouseButtonPress. Additionally, there was a redundant expression in the if statement for cursor locking.
This commit is contained in:
parent
f19da1cf92
commit
5145853351
|
@ -362,16 +362,18 @@ bool RenderWidget::event(QEvent* event)
|
||||||
{
|
{
|
||||||
// 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).
|
||||||
// This event is occasionally missed because isActiveWindow is laggy
|
// This event is occasionally missed because isActiveWindow is laggy
|
||||||
if (Settings::Instance().GetLockCursor() && event->type() == QEvent::MouseButtonPress)
|
if (Settings::Instance().GetLockCursor())
|
||||||
{
|
{
|
||||||
SetCursorLocked(true);
|
SetCursorLocked(true);
|
||||||
}
|
}
|
||||||
// Unhide on movement
|
}
|
||||||
if (!Settings::Instance().GetHideCursor())
|
break;
|
||||||
{
|
case QEvent::MouseMove:
|
||||||
setCursor(Qt::ArrowCursor);
|
// Unhide on movement
|
||||||
m_mouse_timer->start(MOUSE_HIDE_DELAY);
|
if (!Settings::Instance().GetHideCursor())
|
||||||
}
|
{
|
||||||
|
setCursor(Qt::ArrowCursor);
|
||||||
|
m_mouse_timer->start(MOUSE_HIDE_DELAY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QEvent::WinIdChange:
|
case QEvent::WinIdChange:
|
||||||
|
|
Loading…
Reference in New Issue