mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
activeWindow can be null
this is possible in case kwin switches around to another active window
This commit is contained in:
parent
c81bed39bc
commit
52e52c7e90
1 changed files with 5 additions and 3 deletions
|
|
@ -141,9 +141,11 @@ void TaskPanel::updateActiveWindow()
|
||||||
}
|
}
|
||||||
m_activeWindow = m_windowManagement->activeWindow();
|
m_activeWindow = m_windowManagement->activeWindow();
|
||||||
|
|
||||||
|
if (m_activeWindow) {
|
||||||
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::closeableChanged, this, &TaskPanel::hasCloseableActiveWindowChanged);
|
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::closeableChanged, this, &TaskPanel::hasCloseableActiveWindowChanged);
|
||||||
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::unmapped,
|
connect(m_activeWindow.data(), &KWayland::Client::PlasmaWindow::unmapped,
|
||||||
this, &TaskPanel::forgetActiveWindow);
|
this, &TaskPanel::forgetActiveWindow);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: connect to closeableChanged, not needed right now as KWin doesn't provide this changeable
|
// TODO: connect to closeableChanged, not needed right now as KWin doesn't provide this changeable
|
||||||
emit hasCloseableActiveWindowChanged();
|
emit hasCloseableActiveWindowChanged();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue