VirtualBox

Changeset 90701 in vbox


Ignore:
Timestamp:
Aug 17, 2021 10:59:20 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10087: Runtime UI / UIMouseHandler: Couple of bug-fixes for touchpad-based scrolling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r90689 r90701  
    653653                        return true;
    654654#endif /* VBOX_WS_MAC */
    655                 }
     655
     656                    /* This event should be also processed using next 'case': */
     657                }
     658                RT_FALL_THRU();
    656659                case QEvent::MouseButtonRelease:
    657660                {
     
    733736                        machineLogic()->keyboardHandler()->finaliseCaptureKeyboard();
    734737#endif /* VBOX_WS_X11 */
    735                     m_iLastMouseWheelDelta = 0;
     738
     739                    /* For various mouse click related events
     740                     * we also reset last mouse wheel delta: */
     741                    if (pEvent->type() != QEvent::MouseMove)
     742                        m_iLastMouseWheelDelta = 0;
     743
    736744                    if (mouseEvent(pMouseEvent->type(), uScreenId,
    737745                                   pMouseEvent->pos(), pMouseEvent->globalPos(),
     
    759767                    if (qAbs(m_iLastMouseWheelDelta) >= 120)
    760768                    {
    761                         iDelta = m_iLastMouseWheelDelta;
     769                        /* Rounding iDelta to the nearest multiple of 120: */
     770                        iDelta = m_iLastMouseWheelDelta / 120;
     771                        iDelta *= 120;
    762772                        m_iLastMouseWheelDelta = m_iLastMouseWheelDelta % 120;
    763773                    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette