Don't check for waylandServer() when accessing the platform in Compositor
Summary: Less diversions between X11 and Wayland. Reviewers: #plasma Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1415
This commit is contained in:
parent
e4c333a372
commit
4ef07494bd
1 changed files with 23 additions and 26 deletions
|
@ -115,7 +115,11 @@ Compositor::Compositor(QObject* workspace)
|
|||
m_unusedSupportPropertyTimer.setInterval(compositorLostMessageDelay);
|
||||
m_unusedSupportPropertyTimer.setSingleShot(true);
|
||||
connect(&m_unusedSupportPropertyTimer, SIGNAL(timeout()), SLOT(deleteUnusedSupportProperties()));
|
||||
if (kwinApp()->operationMode() != Application::OperationModeX11) {
|
||||
|
||||
// delay the call to setup by one event cycle
|
||||
// The ctor of this class is invoked from the Workspace ctor, that means before
|
||||
// Workspace is completely constructed, so calling Workspace::self() would result
|
||||
// in undefined behavior. This is fixed by using a delayed invocation.
|
||||
if (kwinApp()->platform()->isReady()) {
|
||||
QMetaObject::invokeMethod(this, "setup", Qt::QueuedConnection);
|
||||
}
|
||||
|
@ -134,13 +138,6 @@ Compositor::Compositor(QObject* workspace)
|
|||
cm_selection = nullptr;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
// delay the call to setup by one event cycle
|
||||
// The ctor of this class is invoked from the Workspace ctor, that means before
|
||||
// Workspace is completely constructed, so calling Workspace::self() would result
|
||||
// in undefined behavior. This is fixed by using a delayed invocation.
|
||||
QMetaObject::invokeMethod(this, "setup", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
// register DBus
|
||||
new CompositorDBusInterface(this);
|
||||
|
@ -649,7 +646,7 @@ void Compositor::performCompositing()
|
|||
|
||||
// If outputs are disabled, we return to the event loop and
|
||||
// continue processing events until the outputs are enabled again
|
||||
if (waylandServer() && !kwinApp()->platform()->areOutputsEnabled()) {
|
||||
if (!kwinApp()->platform()->areOutputsEnabled()) {
|
||||
compositeTimer.stop();
|
||||
return;
|
||||
}
|
||||
|
@ -796,7 +793,7 @@ void Compositor::setCompositeTimer()
|
|||
return;
|
||||
|
||||
// Don't start the timer if all outputs are disabled
|
||||
if (waylandServer() && !kwinApp()->platform()->areOutputsEnabled()) {
|
||||
if (!kwinApp()->platform()->areOutputsEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue