Changeset 77726 in vbox
- Timestamp:
- Mar 15, 2019 2:13:17 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129374
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r77724 r77726 1312 1312 { 1313 1313 /* Acquire cursor position and size: */ 1314 QPoint cursorPosition = QPoint(uX, uY) ;1314 QPoint cursorPosition = QPoint(uX, uY) - m_pMachineView->uisession()->cursorHotspot(); 1315 1315 QSize cursorSize = m_pMachineView->uisession()->cursorSize(); 1316 1316 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r77724 r77726 1644 1644 memcpy(image.scanLine(y), pu32SrcShapeScanline, uWidth * sizeof(uint32_t)); 1645 1645 1646 m_cursor = QCursor(QPixmap::fromImage(image), uXHot, uYHot); 1646 m_cursorPixmap = QPixmap::fromImage(image); 1647 m_cursor = QCursor(m_cursorPixmap, uXHot, uYHot); 1647 1648 } 1648 1649 else … … 1733 1734 } 1734 1735 1735 m_cursor = QCursor(QBitmap::fromImage(bitmap), QBitmap::fromImage(mask), uXHot, uYHot); 1736 m_cursorPixmap = QBitmap::fromImage(bitmap); 1737 m_cursor = QCursor(m_cursorPixmap, QBitmap::fromImage(mask), uXHot, uYHot); 1736 1738 } 1737 1739 else … … 1763 1765 } 1764 1766 1765 m_cursor = QCursor(QPixmap::fromImage(image), uXHot, uYHot); 1767 m_cursorPixmap = QPixmap::fromImage(image); 1768 m_cursor = QCursor(m_cursorPixmap, uXHot, uYHot); 1766 1769 } 1767 1770 } … … 1787 1790 1788 1791 /* Create cursor-pixmap from the image: */ 1789 QPixmapcursorPixmap = QPixmap::fromImage(image);1792 m_cursorPixmap = QPixmap::fromImage(image); 1790 1793 1791 1794 # if defined(VBOX_WS_MAC) … … 1801 1804 uXHot /= dDevicePixelRatio; 1802 1805 uYHot /= dDevicePixelRatio; 1803 cursorPixmap.setDevicePixelRatio(dDevicePixelRatio);1806 m_cursorPixmap.setDevicePixelRatio(dDevicePixelRatio); 1804 1807 } 1805 1808 # elif defined(VBOX_WS_X11) … … 1815 1818 uXHot *= dDevicePixelRatio; 1816 1819 uYHot *= dDevicePixelRatio; 1817 cursorPixmap = cursorPixmap.scaled(cursorPixmap.width() * dDevicePixelRatio,cursorPixmap.height() * dDevicePixelRatio,1818 Qt::IgnoreAspectRatio, Qt::SmoothTransformation);1820 m_cursorPixmap = m_cursorPixmap.scaled(m_cursorPixmap.width() * dDevicePixelRatio, m_cursorPixmap.height() * dDevicePixelRatio, 1821 Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 1819 1822 } 1820 1823 # endif /* VBOX_WS_X11 */ 1821 1824 1822 1825 /* Set the new cursor: */ 1823 m_cursor = QCursor( cursorPixmap, uXHot, uYHot);1826 m_cursor = QCursor(m_cursorPixmap, uXHot, uYHot); 1824 1827 m_fIsValidPointerShapePresent = true; 1825 1828 NOREF(srcShapePtrScan); … … 1832 1835 1833 1836 /* Cache cursor pixmap data: */ 1834 m_cursor Pixmap = m_cursor.pixmap();1837 m_cursorHotspot = QPoint(uXHot, uYHot); 1835 1838 m_cursorSize = m_cursorPixmap.size(); 1836 1839 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r77724 r77726 138 138 /** Returns currently cached mouse cursor pixmap. */ 139 139 QPixmap cursorPixmap() const { return m_cursorPixmap; } 140 /** Returns currently cached mouse cursor hotspot. */ 141 QPoint cursorHotspot() const { return m_cursorHotspot; } 140 142 /** Returns currently cached mouse cursor size. */ 141 143 QSize cursorSize() const { return m_cursorSize; } … … 488 490 /** Holds cached mouse cursor pixmap. */ 489 491 QPixmap m_cursorPixmap; 492 /** Holds cached mouse cursor hotspot. */ 493 QPoint m_cursorHotspot; 490 494 /** Holds cached mouse cursor size. */ 491 495 QSize m_cursorSize;
Note:
See TracChangeset
for help on using the changeset viewer.