Disconnect Workspace::outputsChanged from InputPanelV1Window when it's closed

Otherwise the input panel window can be repositioned after it's closed,
which will crash.
This commit is contained in:
Vlad Zahorodnii 2024-05-15 11:47:46 +03:00
parent 0ce58c7cbf
commit 886f0e852b

View file

@ -78,6 +78,7 @@ void InputPanelV1Window::hide()
void InputPanelV1Window::reposition()
{
Q_ASSERT(!isDeleted());
if (!readyForPainting()) {
return;
}
@ -164,6 +165,7 @@ void InputPanelV1Window::destroyWindow()
{
m_panelSurface->disconnect(this);
m_panelSurface->surface()->disconnect(this);
disconnect(workspace(), &Workspace::outputsChanged, this, &InputPanelV1Window::reposition);
markAsDeleted();