[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
remotes/origin/Plasma/5.7
Martin Gräßlin 10 years ago
parent fd19db0fbe
commit feadcea6ce
  1. 2
      plugins/platforms/fbdev/fb_backend.cpp
  2. 2
      plugins/platforms/virtual/virtual_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()) {

@ -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);

Loading…
Cancel
Save