mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
set plasma surface every time
This commit is contained in:
parent
41b4704428
commit
834812e5d9
3 changed files with 16 additions and 3 deletions
|
|
@ -70,7 +70,6 @@ PlasmaCore.ColorScope {
|
|||
if (taskSwitcher.visibility == Window.Hidden && taskSwitcher.offset > -taskSwitcher.height + units.gridUnit && taskSwitcher.tasksCount) {
|
||||
taskSwitcher.visible = true;
|
||||
}
|
||||
plasmoid.nativeInterface.showDesktop = true;
|
||||
}
|
||||
onReleased: {
|
||||
if (!isDragging) {
|
||||
|
|
|
|||
|
|
@ -119,15 +119,28 @@ QWindow *TaskPanel::panel()
|
|||
|
||||
void TaskPanel::setPanel(QWindow *panel)
|
||||
{
|
||||
using namespace KWayland::Client;
|
||||
if (panel == m_panel) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_panel) {
|
||||
disconnect(m_panel, &QWindow::visibilityChanged, this, &TaskPanel::updatePanelVisibility);
|
||||
}
|
||||
m_panel = panel;
|
||||
connect(m_panel, &QWindow::visibilityChanged, this, &TaskPanel::updatePanelVisibility, Qt::QueuedConnection);
|
||||
emit panelChanged();
|
||||
updatePanelVisibility();
|
||||
}
|
||||
|
||||
void TaskPanel::updatePanelVisibility()
|
||||
{
|
||||
using namespace KWayland::Client;
|
||||
if (!m_panel->isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Surface *s = Surface::fromWindow(m_panel);
|
||||
|
||||
Surface *s = Surface::fromWindow(panel);
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ Q_SIGNALS:
|
|||
private:
|
||||
void initWayland();
|
||||
void updateActiveWindow();
|
||||
void updatePanelVisibility();
|
||||
bool m_showingDesktop;
|
||||
QWindow *m_panel = nullptr;
|
||||
KWayland::Client::PlasmaShellSurface *m_shellSurface = nullptr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue