mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03: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) {
|
if (taskSwitcher.visibility == Window.Hidden && taskSwitcher.offset > -taskSwitcher.height + units.gridUnit && taskSwitcher.tasksCount) {
|
||||||
taskSwitcher.visible = true;
|
taskSwitcher.visible = true;
|
||||||
}
|
}
|
||||||
plasmoid.nativeInterface.showDesktop = true;
|
|
||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
if (!isDragging) {
|
if (!isDragging) {
|
||||||
|
|
|
||||||
|
|
@ -119,15 +119,28 @@ QWindow *TaskPanel::panel()
|
||||||
|
|
||||||
void TaskPanel::setPanel(QWindow *panel)
|
void TaskPanel::setPanel(QWindow *panel)
|
||||||
{
|
{
|
||||||
using namespace KWayland::Client;
|
|
||||||
if (panel == m_panel) {
|
if (panel == m_panel) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_panel) {
|
||||||
|
disconnect(m_panel, &QWindow::visibilityChanged, this, &TaskPanel::updatePanelVisibility);
|
||||||
|
}
|
||||||
m_panel = panel;
|
m_panel = panel;
|
||||||
|
connect(m_panel, &QWindow::visibilityChanged, this, &TaskPanel::updatePanelVisibility, Qt::QueuedConnection);
|
||||||
emit panelChanged();
|
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) {
|
if (!s) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ Q_SIGNALS:
|
||||||
private:
|
private:
|
||||||
void initWayland();
|
void initWayland();
|
||||||
void updateActiveWindow();
|
void updateActiveWindow();
|
||||||
|
void updatePanelVisibility();
|
||||||
bool m_showingDesktop;
|
bool m_showingDesktop;
|
||||||
QWindow *m_panel = nullptr;
|
QWindow *m_panel = nullptr;
|
||||||
KWayland::Client::PlasmaShellSurface *m_shellSurface = nullptr;
|
KWayland::Client::PlasmaShellSurface *m_shellSurface = nullptr;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue