Commit 4240c4af authored by David Edmundson's avatar David Edmundson

[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
parent f294e7a0
......@@ -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());
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment