Changeset 94024 in vbox for trunk/src/VBox
- Timestamp:
- Mar 1, 2022 10:47:31 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r94013 r94024 758 758 * guest mouse device at all: */ 759 759 int iDelta = 0; 760 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 761 Qt::Orientation const enmOrientation = RT_ABS(pWheelEvent->pixelDelta().x()) 762 > RT_ABS(pWheelEvent->pixelDelta().y()) ? Qt::Horizontal : Qt::Vertical; 763 m_iLastMouseWheelDelta += enmOrientation == Qt::Horizontal 764 ? pWheelEvent->pixelDelta().x() : pWheelEvent->pixelDelta().y(); 765 #else 760 766 m_iLastMouseWheelDelta += pWheelEvent->delta(); 767 #endif 761 768 if (qAbs(m_iLastMouseWheelDelta) >= 120) 762 769 { … … 767 774 } 768 775 if (mouseEvent(pWheelEvent->type(), uScreenId, 776 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo .... */ 777 pWheelEvent->position().toPoint(), pWheelEvent->globalPosition().toPoint(), 778 #else 769 779 pWheelEvent->pos(), pWheelEvent->globalPos(), 780 #endif 770 781 #ifdef VBOX_WS_MAC 771 782 /* Qt Cocoa is buggy. It always reports a left button pressed when the … … 776 787 pWheelEvent->buttons(), 777 788 #endif /* !VBOX_WS_MAC */ 778 iDelta, pWheelEvent->orientation())) 789 iDelta, 790 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 791 enmOrientation) 792 #else 793 pWheelEvent->orientation()) 794 #endif 795 ) 779 796 return true; 780 797 break;
Note:
See TracChangeset
for help on using the changeset viewer.