Commit 82551e14 authored by David Edmundson's avatar David Edmundson Committed by Vlad Zahorodnii
Browse files

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.
parent ef19948c
......@@ -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;
......
......@@ -999,7 +999,6 @@ protected:
virtual void doSetQuickTileMode();
void setupWindowManagementInterface();
void destroyWindowManagementInterface();
void updateColorScheme();
void setTransientFor(AbstractClient *transientFor);
/**
......
......@@ -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);
......
......@@ -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);
......
Supports Markdown
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