From f39db6c3f8bc8dd3e38da40b5baf87da383bcc4a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 18 Nov 2015 13:36:02 +0100 Subject: Windows: Create one QPlatformCursor per screen. The pixmap-based cursors and some of the standard cursors we create from resource pixmaps need to be separated per screen. Use a QScopedPointer containing the per-screen cursor instead of the previously used QSharedPointer containing the cursor shared by all screens. Task-number: QTBUG-49511 Change-Id: I5203fcc4ecf5a7ff3fea833a4eaeb5300a6e6d54 Reviewed-by: Oliver Wolff Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsscreen.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsscreen.cpp') diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index de4ef79b81..e69665e4a9 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -195,16 +195,6 @@ static QDebug operator<<(QDebug dbg, const QWindowsScreenData &d) } #endif // !QT_NO_DEBUG_STREAM -// Return the cursor to be shared by all screens (virtual desktop). -static inline QSharedPointer sharedCursor() -{ -#ifndef QT_NO_CURSOR - if (const QScreen *primaryScreen = QGuiApplication::primaryScreen()) - return static_cast(primaryScreen->handle())->cursorPtr(); -#endif - return QSharedPointer(new QWindowsCursor); -} - /*! \class QWindowsScreen \brief Windows screen. @@ -216,7 +206,7 @@ static inline QSharedPointer sharedCursor() QWindowsScreen::QWindowsScreen(const QWindowsScreenData &data) : m_data(data) #ifndef QT_NO_CURSOR - ,m_cursor(sharedCursor()) + , m_cursor(new QWindowsCursor(this)) #endif { } -- cgit v1.2.3