Commit 52e52c7e authored by Bhushan Shah's avatar Bhushan Shah 📱

activeWindow can be null

this is possible in case kwin switches around to another active window
parent c81bed39
......@@ -141,9 +141,11 @@ void TaskPanel::updateActiveWindow()
}
m_activeWindow = m_windowManagement->activeWindow();
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::closeableChanged, this, &TaskPanel::hasCloseableActiveWindowChanged);
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::unmapped,
this, &TaskPanel::forgetActiveWindow);
if (m_activeWindow) {
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::closeableChanged, this, &TaskPanel::hasCloseableActiveWindowChanged);
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::unmapped,
this, &TaskPanel::forgetActiveWindow);
}
// TODO: connect to closeableChanged, not needed right now as KWin doesn't provide this changeable
emit hasCloseableActiveWindowChanged();
......
Markdown is supported
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