Commit 834812e5 authored by Marco Martin's avatar Marco Martin

set plasma surface every time

parent 41b47044
......@@ -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;
......
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