[wayland] Call ShellClient install interface methods consistently

Summary:
When we create a new Shellclient there may be a pending relevant
interface.

For every other case this is handled in WaylandServer, the class
responsible for attaching new interfaces at runtime.
The only exception is ServerSideDecorationInterface which is handled in
the ShellClient constructor.

This makes everything consistent.

No behavioural changes.

Test Plan: Ran unit tests

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18592
icc-effect-5.17.5
David Edmundson 2019-01-30 00:59:22 +00:00
parent f294e7a035
commit 4240c4af05
2 changed files with 3 additions and 4 deletions

View File

@ -363,10 +363,6 @@ void ShellClient::init()
}
});
setTransient();
// check whether we have a ServerSideDecoration
if (ServerSideDecorationInterface *deco = ServerSideDecorationInterface::get(s)) {
installServerSideDecoration(deco);
}
AbstractClient::updateColorScheme(QString());

View File

@ -151,6 +151,9 @@ void WaylandServer::createSurface(T *surface)
ScreenLocker::KSldApp::self()->lockScreenShown();
}
auto client = new ShellClient(surface);
if (ServerSideDecorationInterface *deco = ServerSideDecorationInterface::get(surface->surface())) {
client->installServerSideDecoration(deco);
}
auto it = std::find_if(m_plasmaShellSurfaces.begin(), m_plasmaShellSurfaces.end(),
[client] (PlasmaShellSurfaceInterface *surface) {
return client->surface() == surface->surface();