diff options
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 1 | ||||
-rw-r--r-- | src/client/qwaylandscreen.cpp | 7 | ||||
-rw-r--r-- | src/client/qwaylandscreen_p.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index e0155fc9..c3925f5c 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -239,6 +239,7 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin mScreens.append(screen); // We need to get the output events before creating surfaces forceRoundTrip(); + screen->init(); mWaylandIntegration->screenAdded(screen); } else if (interface == QStringLiteral("wl_compositor")) { mCompositorVersion = qMin((int)version, 3); diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp index acd125c6..8a01e366 100644 --- a/src/client/qwaylandscreen.cpp +++ b/src/client/qwaylandscreen.cpp @@ -60,7 +60,7 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin , mFormat(QImage::Format_ARGB32_Premultiplied) , mOutputName(QStringLiteral("Screen%1").arg(id)) , m_orientation(Qt::PrimaryOrientation) - , mWaylandCursor(new QWaylandCursor(this)) + , mWaylandCursor(0) { // handle case of output extension global being sent after outputs createExtendedOutput(); @@ -71,6 +71,11 @@ QWaylandScreen::~QWaylandScreen() delete mWaylandCursor; } +void QWaylandScreen::init() +{ + mWaylandCursor = new QWaylandCursor(this); +} + QWaylandDisplay * QWaylandScreen::display() const { return mWaylandDisplay; diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h index 35adee34..06389f7e 100644 --- a/src/client/qwaylandscreen_p.h +++ b/src/client/qwaylandscreen_p.h @@ -53,6 +53,7 @@ public: QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id); ~QWaylandScreen(); + void init(); QWaylandDisplay *display() const; QRect geometry() const; |