Adapt to window management changes

Our wayland interface lifespan only needs to live as long as the window
is mapped.

Given this corresponds directly to the lifespan of AbstractClient we can
just set a parent and everything is handled implicitly.
This commit is contained in:
David Edmundson 2021-03-08 22:36:08 +00:00 committed by Vlad Zahorodnii
parent ef19948c00
commit 82551e143d
4 changed files with 1 additions and 13 deletions

View file

@ -1498,7 +1498,7 @@ void AbstractClient::setupWindowManagementInterface()
return;
}
using namespace KWaylandServer;
auto w = waylandServer()->windowManagement()->createWindow(waylandServer()->windowManagement(), internalId());
auto w = waylandServer()->windowManagement()->createWindow(this, internalId());
w->setTitle(caption());
w->setVirtualDesktop(isOnAllDesktops() ? 0 : desktop() - 1);
w->setActive(isActive());
@ -1685,14 +1685,6 @@ void AbstractClient::setupWindowManagementInterface()
m_windowManagementInterface = w;
}
void AbstractClient::destroyWindowManagementInterface()
{
if (m_windowManagementInterface) {
m_windowManagementInterface->unmap();
m_windowManagementInterface = nullptr;
}
}
Options::MouseCommand AbstractClient::getMouseCommand(Qt::MouseButton button, bool *handled) const
{
*handled = false;

View file

@ -999,7 +999,6 @@ protected:
virtual void doSetQuickTileMode();
void setupWindowManagementInterface();
void destroyWindowManagementInterface();
void updateColorScheme();
void setTransientFor(AbstractClient *transientFor);
/**

View file

@ -206,7 +206,6 @@ void X11Client::releaseWindow(bool on_shutdown)
tabBox->nextPrev(true);
}
#endif
destroyWindowManagementInterface();
Deleted* del = nullptr;
if (!on_shutdown) {
del = Deleted::create(this);
@ -279,7 +278,6 @@ void X11Client::destroyClient()
tabBox->nextPrev(true);
}
#endif
destroyWindowManagementInterface();
Deleted* del = Deleted::create(this);
if (isMoveResize())
emit clientFinishUserMovedResized(this);

View file

@ -328,7 +328,6 @@ void XdgSurfaceClient::destroyClient()
emit windowClosed(this, deleted);
StackingUpdatesBlocker blocker(workspace());
RuleBook::self()->discardUsed(this, true);
destroyWindowManagementInterface();
destroyDecoration();
cleanGrouping();
waylandServer()->removeClient(this);