[wayland] Get rid of some code duplication in XdgShellClient constructors

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24332
remotes/origin/mart/auroraeBordersRefactor
Vlad Zahorodnii 7 years ago
parent 3ff0f3781a
commit 45784b70e7
  1. 8
      xdgshellclient.cpp

@ -70,9 +70,7 @@ XdgShellClient::XdgShellClient(XdgShellSurfaceInterface *surface)
, m_xdgShellPopup(nullptr)
{
setSurface(surface->surface());
m_requestGeometryBlockCounter++;
init();
connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
}
XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface)
@ -81,15 +79,15 @@ XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface)
, m_xdgShellPopup(surface)
{
setSurface(surface->surface());
m_requestGeometryBlockCounter++;
init();
connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
}
XdgShellClient::~XdgShellClient() = default;
void XdgShellClient::init()
{
m_requestGeometryBlockCounter++;
connect(this, &XdgShellClient::desktopFileNameChanged, this, &XdgShellClient::updateIcon);
createWindowId();
setupCompositing();
@ -173,6 +171,8 @@ void XdgShellClient::init()
handleTransientForChanged();
AbstractClient::updateColorScheme(QString());
connect(surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
}
void XdgShellClient::finishInit()

Loading…
Cancel
Save