From feadcea6cea7b74acf4896c85dcb7d577615ff42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 28 Jun 2016 08:43:57 +0200 Subject: [PATCH] [platforms] Call setSoftWareCursor in init instead of ctor Summary: Platform::setSoftWareCursor creates connections to the Cursor in order to trigger repaints whenever the cursor position changes. The Cursor is created before Platform::init is called, but after the Platform is created. Thus the call needs to happen in init, otherwise the cursor is not rendered correctly. BUG: 356328 FIXED-IN: 5.7.0 Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D2025 --- plugins/platforms/fbdev/fb_backend.cpp | 2 +- plugins/platforms/virtual/virtual_backend.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/platforms/fbdev/fb_backend.cpp b/plugins/platforms/fbdev/fb_backend.cpp index 95b0925e6c..fc7ed42c78 100644 --- a/plugins/platforms/fbdev/fb_backend.cpp +++ b/plugins/platforms/fbdev/fb_backend.cpp @@ -38,7 +38,6 @@ namespace KWin FramebufferBackend::FramebufferBackend(QObject *parent) : Platform(parent) { - setSoftWareCursor(true); } FramebufferBackend::~FramebufferBackend() @@ -61,6 +60,7 @@ QPainterBackend *FramebufferBackend::createQPainterBackend() void FramebufferBackend::init() { + setSoftWareCursor(true); LogindIntegration *logind = LogindIntegration::self(); auto takeControl = [logind, this]() { if (logind->hasSessionControl()) { diff --git a/plugins/platforms/virtual/virtual_backend.cpp b/plugins/platforms/virtual/virtual_backend.cpp index b231fbb5e5..396b56cd54 100644 --- a/plugins/platforms/virtual/virtual_backend.cpp +++ b/plugins/platforms/virtual/virtual_backend.cpp @@ -42,7 +42,6 @@ VirtualBackend::VirtualBackend(QObject *parent) qDebug() << "Screenshots saved to: " << m_screenshotDir->path(); } } - setSoftWareCursor(true); setSupportsPointerWarping(true); } @@ -50,6 +49,7 @@ VirtualBackend::~VirtualBackend() = default; void VirtualBackend::init() { + setSoftWareCursor(true); m_size = initialWindowSize(); setReady(true); waylandServer()->seat()->setHasPointer(true);