layershellv1window: don't destroy the window twice

Outputs get disabled before they get destroyed, so destroying the window
when the output gets disabled and when it gets destroyed causes the window
to be destroyed twice and run into an assert
This commit is contained in:
Xaver Hugl 2023-06-21 16:20:50 +02:00
parent 4d9a0d2306
commit 2132dddf0d
2 changed files with 1 additions and 9 deletions

View file

@ -58,8 +58,6 @@ LayerShellV1Window::LayerShellV1Window(LayerSurfaceV1Interface *shellSurface,
this, &LayerShellV1Window::scheduleRearrange);
connect(output, &Output::enabledChanged,
this, &LayerShellV1Window::handleOutputEnabledChanged);
connect(output, &Output::destroyed,
this, &LayerShellV1Window::handleOutputDestroyed);
connect(shellSurface->surface(), &SurfaceInterface::sizeChanged,
this, &LayerShellV1Window::handleSizeChanged);
@ -180,6 +178,7 @@ void LayerShellV1Window::destroyWindow()
}
m_shellSurface->disconnect(this);
m_shellSurface->surface()->disconnect(this);
m_desiredOutput->disconnect(this);
markAsDeleted();
cleanTabBox();
@ -279,12 +278,6 @@ void LayerShellV1Window::handleOutputEnabledChanged()
}
}
void LayerShellV1Window::handleOutputDestroyed()
{
closeWindow();
destroyWindow();
}
void LayerShellV1Window::setVirtualKeyboardGeometry(const QRectF &geo)
{
if (m_virtualKeyboardGeometry == geo) {

View file

@ -60,7 +60,6 @@ private:
void handleCommitted();
void handleAcceptsFocusChanged();
void handleOutputEnabledChanged();
void handleOutputDestroyed();
void scheduleRearrange();
void activateScreenEdge();
void deactivateScreenEdge();