- Timestamp:
- Jun 26, 2018 11:26:11 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123212
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r72681 r72692 1853 1853 } 1854 1854 1855 /* static */ 1856 void VBoxGlobal::unsetCursor(QWidget *pWidget) 1857 { 1858 if (!pWidget) 1859 return; 1860 1861 #ifdef VBOX_WS_X11 1862 /* As reported in https://www.virtualbox.org/ticket/16348, 1863 * in X11 QWidget::unsetCursor(..) call uses RENDER 1864 * extension. Qt (before 5.11) fails to handle the case where the mentioned extension 1865 * is missing. Please see https://codereview.qt-project.org/#/c/225665/ for Qt patch: */ 1866 if ((VBoxGlobal::qtRTMajorVersion() < 5) || 1867 (VBoxGlobal::qtRTMajorVersion() == 5 && VBoxGlobal::qtRTMinorVersion() < 11)) 1868 { 1869 if (X11CheckExtension("RENDER")) 1870 pWidget->unsetCursor(); 1871 } 1872 else 1873 { 1874 pWidget->unsetCursor(); 1875 } 1876 #else 1877 pWidget->unsetCursor(); 1878 #endif 1879 } 1880 1881 /* static */ 1882 void VBoxGlobal::unsetCursor(QGraphicsWidget *pWidget) 1883 { 1884 if (!pWidget) 1885 return; 1886 1887 #ifdef VBOX_WS_X11 1888 /* As reported in https://www.virtualbox.org/ticket/16348, 1889 * in X11 QGraphicsWidget::unsetCursor(..) call uses RENDER 1890 * extension. Qt (before 5.11) fails to handle the case where the mentioned extension 1891 * is missing. Please see https://codereview.qt-project.org/#/c/225665/ for Qt patch: */ 1892 if ((VBoxGlobal::qtRTMajorVersion() < 5) || 1893 (VBoxGlobal::qtRTMajorVersion() == 5 && VBoxGlobal::qtRTMinorVersion() < 11)) 1894 { 1895 if (X11CheckExtension("RENDER")) 1896 pWidget->unsetCursor(); 1897 } 1898 else 1899 { 1900 pWidget->unsetCursor(); 1901 } 1902 #else 1903 pWidget->unsetCursor(); 1904 #endif 1905 } 1906 1907 1855 1908 #if defined(VBOX_WS_X11) 1856 1909 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r72681 r72692 395 395 static void setCursor(QWidget *pWidget, const QCursor &cursor); 396 396 static void setCursor(QGraphicsWidget *pWidget, const QCursor &cursor); 397 static void unsetCursor(QWidget *pWidget); 398 static void unsetCursor(QGraphicsWidget *pWidget); 397 399 398 400 #ifdef VBOX_WS_X11 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r72678 r72692 502 502 QList<ulong> screenIds = m_viewports.keys(); 503 503 for (int i = 0; i < screenIds.size(); ++i) 504 m_viewports[screenIds[i]]->unsetCursor();504 VBoxGlobal::unsetCursor(m_viewports[screenIds[i]]); 505 505 } 506 506 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
r72678 r72692 683 683 VBoxGlobal::setCursor(this, Qt::PointingHandCursor); 684 684 else 685 unsetCursor();685 VBoxGlobal::unsetCursor(this); 686 686 update(); 687 687 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp
r72678 r72692 391 391 /* Update mouse-cursor: */ 392 392 if (m_strHoveredAnchor.isNull()) 393 unsetCursor();393 VBoxGlobal::unsetCursor(this); 394 394 else 395 395 VBoxGlobal::setCursor(this, Qt::PointingHandCursor);
Note:
See TracChangeset
for help on using the changeset viewer.