From 6ed1031c2212852fcf43ee73268f9f5d63a8d09c Mon Sep 17 00:00:00 2001 From: Marcus Britanicus Date: Wed, 27 Mar 2024 16:54:01 +0530 Subject: [PATCH] Forward the signals from m_backend lxqttakcarwaylandbacked.cpp --- panel/backends/wayland/lxqttaskbarbackendwayland.cpp | 11 +++++++++++ plugin-taskbar/lxqttaskbar.cpp | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/panel/backends/wayland/lxqttaskbarbackendwayland.cpp b/panel/backends/wayland/lxqttaskbarbackendwayland.cpp index ad523faeb..05d5941ef 100644 --- a/panel/backends/wayland/lxqttaskbarbackendwayland.cpp +++ b/panel/backends/wayland/lxqttaskbarbackendwayland.cpp @@ -64,6 +64,17 @@ LXQtTaskbarWaylandBackend::LXQtTaskbarWaylandBackend(QObject *parent) if ( m_backend == nullptr ) { qDebug() << "--------------> Using dummy backend. No window management will be done"; } + + else { + connect(m_backend, &ILXQtTaskbarAbstractBackend::reloaded, this, &ILXQtTaskbarAbstractBackend::reloaded ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::windowAdded, this, &ILXQtTaskbarAbstractBackend::windowAdded ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::windowRemoved, this, &ILXQtTaskbarAbstractBackend::windowRemoved ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::windowPropertyChanged, this, &ILXQtTaskbarAbstractBackend::windowPropertyChanged ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::workspacesCountChanged, this, &ILXQtTaskbarAbstractBackend::workspacesCountChanged ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::workspaceNameChanged, this, &ILXQtTaskbarAbstractBackend::workspaceNameChanged ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::currentWorkspaceChanged, this, &ILXQtTaskbarAbstractBackend::currentWorkspaceChanged ); + connect(m_backend, &ILXQtTaskbarAbstractBackend::activeWindowChanged, this, &ILXQtTaskbarAbstractBackend::activeWindowChanged ); + } } diff --git a/plugin-taskbar/lxqttaskbar.cpp b/plugin-taskbar/lxqttaskbar.cpp index 94b9a6ab9..4d8b1bb2d 100644 --- a/plugin-taskbar/lxqttaskbar.cpp +++ b/plugin-taskbar/lxqttaskbar.cpp @@ -105,7 +105,11 @@ LXQtTaskBar::LXQtTaskBar(ILXQtPanelPlugin *plugin, QWidget *parent) : QTimer::singleShot(0, this, &LXQtTaskBar::registerShortcuts); connect(mBackend, &ILXQtTaskbarAbstractBackend::windowPropertyChanged, this, &LXQtTaskBar::onWindowChanged); - connect(mBackend, &ILXQtTaskbarAbstractBackend::windowAdded, this, &LXQtTaskBar::onWindowAdded); + // connect(mBackend, &ILXQtTaskbarAbstractBackend::windowAdded, this, &LXQtTaskBar::onWindowAdded); + qDebug() << connect(mBackend, &ILXQtTaskbarAbstractBackend::windowAdded, [=](WId window){ + qDebug() << "--------------> onWindowAdded" << window; + onWindowAdded(window); + }); connect(mBackend, &ILXQtTaskbarAbstractBackend::windowRemoved, this, &LXQtTaskBar::onWindowRemoved); // Consider already fetched windows