From d5a91f113ffe47e9005529e4ef4b8dac07619aaf Mon Sep 17 00:00:00 2001 From: buxiaoqing Date: Wed, 1 Mar 2023 10:42:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=BB=E7=BA=BF=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statusnotiferscrollarea.cpp | 15 ++++++++++++++- plugin-taskbar/ukuitaskwidget.cpp | 19 ++++++++++++------- plugin-taskbar/ukuitaskwidget.h | 2 +- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/plugin-statusnotifier/statusnotiferscrollarea.cpp b/plugin-statusnotifier/statusnotiferscrollarea.cpp index e2335b7..ef188be 100644 --- a/plugin-statusnotifier/statusnotiferscrollarea.cpp +++ b/plugin-statusnotifier/statusnotiferscrollarea.cpp @@ -38,8 +38,9 @@ StatusNotiferScrollArea::StatusNotiferScrollArea(IUKUIPanelPlugin *plugin, QWidg QSettings backup_qsettings(CONFIG_FILE_BACKUP,QSettings::IniFormat); QStringList showAppBackup = backup_qsettings.value("statusnotifier/showApp").toStringList(); QStringList hideAppBackup = backup_qsettings.value("statusnotifier/hideApp").toStringList(); + QStringList fixedAppBackup = backup_qsettings.value("statusnotifier/fixedApp").toStringList(); QString alignmentBackup = backup_qsettings.value("statusnotifier/alignment").toString(); - PluginSettings *settings=m_plugin->settings(); // ~/.config/ukui/panel.conf + PluginSettings *settings = m_plugin->settings(); // ~/.config/ukui/panel.conf QStringList allkeys = settings->allKeys(); if(!allkeys.contains("showApp")) { settings->setValue("showApp",showAppBackup); @@ -47,6 +48,18 @@ StatusNotiferScrollArea::StatusNotiferScrollArea(IUKUIPanelPlugin *plugin, QWidg if(!allkeys.contains("hideApp")) { settings->setValue("hideApp",hideAppBackup); } + if(!allkeys.contains("fixedApp")) { + settings->setValue("fixedApp",fixedAppBackup); + } + QStringList showApp = settings->value("showApp").toStringList(); + QStringList hideApp = settings->value("hideApp").toStringList(); + for(int i=0; isetValue("showApp",showApp); + settings->setValue("hideApp",hideApp); if(!allkeys.contains("alignment")) { settings->setValue("alignment",alignmentBackup); } diff --git a/plugin-taskbar/ukuitaskwidget.cpp b/plugin-taskbar/ukuitaskwidget.cpp index 120cd55..91200dc 100644 --- a/plugin-taskbar/ukuitaskwidget.cpp +++ b/plugin-taskbar/ukuitaskwidget.cpp @@ -291,6 +291,16 @@ void UKUITaskWidget::sendSigToKwin() } +void UKUITaskWidget::sendCloseSigToKWin() +{ + QDBusMessage message = QDBusMessage::createSignal("/", "com.ukui.kwin", "panelNotUpdateLayer"); + QList args; + bool flag = true; + args.append(flag); + message.setArguments(args); + QDBusConnection::sessionBus().send(message); +} + void UKUITaskWidget::keepLeave() { if (m_timer->isActive()) { @@ -304,13 +314,6 @@ void UKUITaskWidget::keepLeave() if(this->isVisible()) { return; } - QDBusMessage message = QDBusMessage::createSignal("/", "com.ukui.kwin", "panelNotUpdateLayer"); - QList args; - bool flag = true; - args.append(flag); - message.setArguments(args); - QDBusConnection::sessionBus().send(message); - } void UKUITaskWidget::contextMenuEvent(QContextMenuEvent *event) @@ -372,6 +375,7 @@ void UKUITaskWidget::raiseSdkApplication() WindowManager::activateWindow(m_sdkWindow); } WindowManager::activateWindow(m_sdkWindow); + sendCloseSigToKWin(); emit windowActived(); } @@ -440,6 +444,7 @@ void UKUITaskWidget::closeSdkApplication() { // FIXME: Why there is no such thing in KWindowSystem?? WindowManager::closeWindow(m_sdkWindow); + sendCloseSigToKWin(); } void UKUITaskWidget::getSysTransparency() diff --git a/plugin-taskbar/ukuitaskwidget.h b/plugin-taskbar/ukuitaskwidget.h index f948ffb..8b02211 100644 --- a/plugin-taskbar/ukuitaskwidget.h +++ b/plugin-taskbar/ukuitaskwidget.h @@ -154,7 +154,7 @@ private slots: void keepLeave(); void sendSigToKwin(); - + void sendCloseSigToKWin(); signals: void dropped(QObject * dragSource, QPoint const & pos);