Changeset 81826 in vbox
- Timestamp:
- Nov 13, 2019 1:36:00 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134617
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r81736 r81826 1844 1844 m_cursorPixmap = QPixmap::fromImage(image); 1845 1845 updateMousePointerPixmapScaling(m_cursorPixmap, uXHot, uYHot); 1846 1847 # if defined(VBOX_WS_X11)1848 /* Adjust device-pixel-ratio: */1849 /// @todo In case of multi-monitor setup check whether device-pixel-ratio and cursor are screen specific.1850 /* Get screen-id of main-window: */1851 const ulong uScreenID = activeMachineWindow()->screenId();1852 /* Get device-pixel-ratio: */1853 const double dDevicePixelRatio = frameBuffer(uScreenID)->devicePixelRatio();1854 /* Adjust device-pixel-ratio if necessary: */1855 if (dDevicePixelRatio > 1.0 && !frameBuffer(uScreenID)->useUnscaledHiDPIOutput())1856 {1857 uXHot *= dDevicePixelRatio;1858 uYHot *= dDevicePixelRatio;1859 m_cursorPixmap = m_cursorPixmap.scaled(m_cursorPixmap.width() * dDevicePixelRatio, m_cursorPixmap.height() * dDevicePixelRatio,1860 Qt::IgnoreAspectRatio, Qt::SmoothTransformation);1861 }1862 # endif /* VBOX_WS_X11 */1863 1864 /* Set the new cursor: */1865 1846 m_cursor = QCursor(m_cursorPixmap, uXHot, uYHot); 1866 1847 m_fIsValidPointerShapePresent = true; … … 1910 1891 } 1911 1892 1912 #elif defined(VBOX_WS_WIN) 1893 #elif defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 1913 1894 1914 1895 /* Get screen-id of active machine-window: */ … … 1926 1907 1927 1908 /* Take into account device-pixel-ratio if necessary: */ 1909 # ifdef VBOX_WS_WIN 1928 1910 const double dDevicePixelRatio = frameBuffer(uScreenID)->devicePixelRatio(); 1911 # endif 1929 1912 const double dDevicePixelRatioActual = frameBuffer(uScreenID)->devicePixelRatioActual(); 1930 1913 const bool fUseUnscaledHiDPIOutput = frameBuffer(uScreenID)->useUnscaledHiDPIOutput(); … … 1944 1927 } 1945 1928 1929 # ifdef VBOX_WS_WIN 1946 1930 /* If device pixel ratio was set: */ 1947 1931 if (dDevicePixelRatio > 1.0) … … 1952 1936 uYHot /= dDevicePixelRatio; 1953 1937 } 1938 # endif 1954 1939 1955 1940 #else
Note:
See TracChangeset
for help on using the changeset viewer.