[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
This commit is contained in:
parent
fd19db0fbe
commit
feadcea6ce
2 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,6 @@ namespace KWin
|
||||||
FramebufferBackend::FramebufferBackend(QObject *parent)
|
FramebufferBackend::FramebufferBackend(QObject *parent)
|
||||||
: Platform(parent)
|
: Platform(parent)
|
||||||
{
|
{
|
||||||
setSoftWareCursor(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FramebufferBackend::~FramebufferBackend()
|
FramebufferBackend::~FramebufferBackend()
|
||||||
|
@ -61,6 +60,7 @@ QPainterBackend *FramebufferBackend::createQPainterBackend()
|
||||||
|
|
||||||
void FramebufferBackend::init()
|
void FramebufferBackend::init()
|
||||||
{
|
{
|
||||||
|
setSoftWareCursor(true);
|
||||||
LogindIntegration *logind = LogindIntegration::self();
|
LogindIntegration *logind = LogindIntegration::self();
|
||||||
auto takeControl = [logind, this]() {
|
auto takeControl = [logind, this]() {
|
||||||
if (logind->hasSessionControl()) {
|
if (logind->hasSessionControl()) {
|
||||||
|
|
|
@ -42,7 +42,6 @@ VirtualBackend::VirtualBackend(QObject *parent)
|
||||||
qDebug() << "Screenshots saved to: " << m_screenshotDir->path();
|
qDebug() << "Screenshots saved to: " << m_screenshotDir->path();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setSoftWareCursor(true);
|
|
||||||
setSupportsPointerWarping(true);
|
setSupportsPointerWarping(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +49,7 @@ VirtualBackend::~VirtualBackend() = default;
|
||||||
|
|
||||||
void VirtualBackend::init()
|
void VirtualBackend::init()
|
||||||
{
|
{
|
||||||
|
setSoftWareCursor(true);
|
||||||
m_size = initialWindowSize();
|
m_size = initialWindowSize();
|
||||||
setReady(true);
|
setReady(true);
|
||||||
waylandServer()->seat()->setHasPointer(true);
|
waylandServer()->seat()->setHasPointer(true);
|
||||||
|
|
Loading…
Reference in a new issue