mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
fix close button
enabled when it should, also use a qpointer to remove some crashes
This commit is contained in:
parent
98348f1fa1
commit
1bd4990984
2 changed files with 7 additions and 1 deletions
|
|
@ -146,7 +146,13 @@ void TaskPanel::updateActiveWindow()
|
||||||
if (!m_windowManagement) {
|
if (!m_windowManagement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (m_activeWindow) {
|
||||||
|
disconnect(m_activeWindow, &KWayland::Client::PlasmaWindow::closeableChanged, this, &TaskPanel::hasCloseableActiveWindowChanged);
|
||||||
|
}
|
||||||
m_activeWindow = m_windowManagement->activeWindow();
|
m_activeWindow = m_windowManagement->activeWindow();
|
||||||
|
|
||||||
|
connect(m_activeWindow, &KWayland::Client::PlasmaWindow::closeableChanged, this, &TaskPanel::hasCloseableActiveWindowChanged);
|
||||||
|
|
||||||
// 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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ private:
|
||||||
KWayland::Client::PlasmaShell *m_shellInterface = nullptr;
|
KWayland::Client::PlasmaShell *m_shellInterface = nullptr;
|
||||||
KWayland::Client::PlasmaWindowManagement *m_windowManagement = nullptr;
|
KWayland::Client::PlasmaWindowManagement *m_windowManagement = nullptr;
|
||||||
KWayland::Client::PlasmaWindowModel *m_windowModel = nullptr;
|
KWayland::Client::PlasmaWindowModel *m_windowModel = nullptr;
|
||||||
KWayland::Client::PlasmaWindow *m_activeWindow = nullptr;
|
QPointer<KWayland::Client::PlasmaWindow> m_activeWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue