[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
This commit is contained in:
parent
3ff0f3781a
commit
45784b70e7
1 changed files with 4 additions and 4 deletions
|
@ -70,9 +70,7 @@ XdgShellClient::XdgShellClient(XdgShellSurfaceInterface *surface)
|
||||||
, m_xdgShellPopup(nullptr)
|
, m_xdgShellPopup(nullptr)
|
||||||
{
|
{
|
||||||
setSurface(surface->surface());
|
setSurface(surface->surface());
|
||||||
m_requestGeometryBlockCounter++;
|
|
||||||
init();
|
init();
|
||||||
connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface)
|
XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface)
|
||||||
|
@ -81,15 +79,15 @@ XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface)
|
||||||
, m_xdgShellPopup(surface)
|
, m_xdgShellPopup(surface)
|
||||||
{
|
{
|
||||||
setSurface(surface->surface());
|
setSurface(surface->surface());
|
||||||
m_requestGeometryBlockCounter++;
|
|
||||||
init();
|
init();
|
||||||
connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgShellClient::~XdgShellClient() = default;
|
XdgShellClient::~XdgShellClient() = default;
|
||||||
|
|
||||||
void XdgShellClient::init()
|
void XdgShellClient::init()
|
||||||
{
|
{
|
||||||
|
m_requestGeometryBlockCounter++;
|
||||||
|
|
||||||
connect(this, &XdgShellClient::desktopFileNameChanged, this, &XdgShellClient::updateIcon);
|
connect(this, &XdgShellClient::desktopFileNameChanged, this, &XdgShellClient::updateIcon);
|
||||||
createWindowId();
|
createWindowId();
|
||||||
setupCompositing();
|
setupCompositing();
|
||||||
|
@ -173,6 +171,8 @@ void XdgShellClient::init()
|
||||||
handleTransientForChanged();
|
handleTransientForChanged();
|
||||||
|
|
||||||
AbstractClient::updateColorScheme(QString());
|
AbstractClient::updateColorScheme(QString());
|
||||||
|
|
||||||
|
connect(surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XdgShellClient::finishInit()
|
void XdgShellClient::finishInit()
|
||||||
|
|
Loading…
Reference in a new issue