Changeset 82022 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 20, 2019 11:53:25 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134825
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r80617 r82022 1517 1517 || !m_pMachineView->uisession()->isMouseSupportsAbsolute())) 1518 1518 { 1519 /* Acquire session cursor pixmap: */1520 QPixmap cursorPixmap = m_pMachineView->uisession()->cursor Pixmap();1519 /* Acquire session cursor shape pixmap: */ 1520 QPixmap cursorPixmap = m_pMachineView->uisession()->cursorShapePixmap(); 1521 1521 1522 1522 /* Take the device-pixel-ratio into account: */ … … 1626 1626 || !m_pMachineView->uisession()->isMouseSupportsAbsolute())) 1627 1627 { 1628 /* Acquire session cursor pixmap: */1629 QPixmap cursorPixmap = m_pMachineView->uisession()->cursor Pixmap();1628 /* Acquire session cursor shape pixmap: */ 1629 QPixmap cursorPixmap = m_pMachineView->uisession()->cursorShapePixmap(); 1630 1630 1631 1631 /* Take the device-pixel-ratio into account: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r82021 r82022 1667 1667 /* Invalidate mouse pointer shape initially: */ 1668 1668 m_fIsValidPointerShapePresent = false; 1669 m_cursorShapePixmap = QPixmap(); 1670 m_cursorMaskPixmap = QPixmap(); 1669 1671 1670 1672 /* Parse incoming shape data: */ … … 1695 1697 memcpy(image.scanLine(y), pu32SrcShapeScanline, uWidth * sizeof(uint32_t)); 1696 1698 1697 m_cursor Pixmap = QPixmap::fromImage(image);1698 updateMousePointerPixmapScaling(m_cursor Pixmap, uXHot, uYHot);1699 m_cursor = QCursor(m_cursor Pixmap, uXHot, uYHot);1699 m_cursorShapePixmap = QPixmap::fromImage(image); 1700 updateMousePointerPixmapScaling(m_cursorShapePixmap, uXHot, uYHot); 1701 m_cursor = QCursor(m_cursorShapePixmap, uXHot, uYHot); 1700 1702 } 1701 1703 else … … 1786 1788 } 1787 1789 1788 m_cursorPixmap = QBitmap::fromImage(bitmap); 1789 updateMousePointerPixmapScaling(m_cursorPixmap, uXHot, uYHot); 1790 m_cursor = QCursor(m_cursorPixmap, QBitmap::fromImage(mask), uXHot, uYHot); 1790 m_cursorShapePixmap = QBitmap::fromImage(bitmap); 1791 m_cursorMaskPixmap = QBitmap::fromImage(mask); 1792 updateMousePointerPixmapScaling(m_cursorShapePixmap, uXHot, uYHot); 1793 updateMousePointerPixmapScaling(m_cursorMaskPixmap, uXHot, uYHot); 1794 m_cursor = QCursor(m_cursorShapePixmap, m_cursorMaskPixmap, uXHot, uYHot); 1791 1795 } 1792 1796 else … … 1818 1822 } 1819 1823 1820 m_cursor Pixmap = QPixmap::fromImage(image);1821 updateMousePointerPixmapScaling(m_cursor Pixmap, uXHot, uYHot);1822 m_cursor = QCursor(m_cursor Pixmap, uXHot, uYHot);1824 m_cursorShapePixmap = QPixmap::fromImage(image); 1825 updateMousePointerPixmapScaling(m_cursorShapePixmap, uXHot, uYHot); 1826 m_cursor = QCursor(m_cursorShapePixmap, uXHot, uYHot); 1823 1827 } 1824 1828 } … … 1843 1847 1844 1848 /* Create cursor-pixmap from the image: */ 1845 m_cursor Pixmap = QPixmap::fromImage(image);1846 updateMousePointerPixmapScaling(m_cursor Pixmap, uXHot, uYHot);1847 m_cursor = QCursor(m_cursor Pixmap, uXHot, uYHot);1849 m_cursorShapePixmap = QPixmap::fromImage(image); 1850 updateMousePointerPixmapScaling(m_cursorShapePixmap, uXHot, uYHot); 1851 m_cursor = QCursor(m_cursorShapePixmap, uXHot, uYHot); 1848 1852 m_fIsValidPointerShapePresent = true; 1849 1853 … … 1855 1859 1856 1860 /* Cache cursor pixmap size: */ 1857 m_cursorSize = m_cursor Pixmap.size();1861 m_cursorSize = m_cursorShapePixmap.size(); 1858 1862 } 1859 1863 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r81622 r82022 137 137 /** Returns currently cached mouse cursor. */ 138 138 QCursor cursor() const { return m_cursor; } 139 /** Returns currently cached mouse cursor pixmap. */ 140 QPixmap cursorPixmap() const { return m_cursorPixmap; } 139 /** Returns currently cached mouse cursor shape pixmap. */ 140 QPixmap cursorShapePixmap() const { return m_cursorShapePixmap; } 141 /** Returns currently cached mouse cursor mask pixmap. */ 142 QPixmap cursorMaskPixmap() const { return m_cursorMaskPixmap; } 141 143 /** Returns currently cached mouse cursor size. */ 142 144 QSize cursorSize() const { return m_cursorSize; } … … 512 514 /** Holds cached mouse cursor. */ 513 515 QCursor m_cursor; 514 /** Holds cached mouse cursor pixmap. */ 515 QPixmap m_cursorPixmap; 516 /** Holds cached mouse cursor shape pixmap. */ 517 QPixmap m_cursorShapePixmap; 518 /** Holds cached mouse cursor mask pixmap. */ 519 QPixmap m_cursorMaskPixmap; 516 520 /** Holds cached mouse cursor size. */ 517 521 QSize m_cursorSize;
Note:
See TracChangeset
for help on using the changeset viewer.