diff --git a/0005-fix-touchpad-Fix-touchpad-display-with-the-type-psmo.patch b/0005-fix-touchpad-Fix-touchpad-display-with-the-type-psmo.patch new file mode 100644 index 0000000000000000000000000000000000000000..f46dfee97fa7a58f168a83d3199d738636fc077d --- /dev/null +++ b/0005-fix-touchpad-Fix-touchpad-display-with-the-type-psmo.patch @@ -0,0 +1,140 @@ +From dec1b2e8501c3f20c83efa6c8d9f5124fccaf316 Mon Sep 17 00:00:00 2001 +From: meizhigang +Date: Tue, 16 Apr 2024 14:52:46 +0800 +Subject: [PATCH] fix(touchpad):Fix touchpad display with the type psmouse +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + -适配psmouse类型触摸板设备 + + Related #34878 +--- + ....kylinsec.Kiran.SessionDaemon.TouchPad.xml | 15 ++++ + plugins/mouse/pages/touchpad-page.cpp | 72 +++++++++++-------- + 2 files changed, 58 insertions(+), 29 deletions(-) + +diff --git a/plugins/mouse/data/com.kylinsec.Kiran.SessionDaemon.TouchPad.xml b/plugins/mouse/data/com.kylinsec.Kiran.SessionDaemon.TouchPad.xml +index 8087b87..f5527ad 100644 +--- a/plugins/mouse/data/com.kylinsec.Kiran.SessionDaemon.TouchPad.xml ++++ b/plugins/mouse/data/com.kylinsec.Kiran.SessionDaemon.TouchPad.xml +@@ -36,6 +36,21 @@ + Click methods are usually only available on clickpads. + + ++ ++ ++ The support of disable while typing.> ++ ++ ++ ++ ++ The support of tap to click. ++ ++ ++ ++ ++ The support of click method. ++ ++ + + + Enables a scroll method. Permitted methods are twofinger, edge and button. +diff --git a/plugins/mouse/pages/touchpad-page.cpp b/plugins/mouse/pages/touchpad-page.cpp +index 21062be..63bacc1 100644 +--- a/plugins/mouse/pages/touchpad-page.cpp ++++ b/plugins/mouse/pages/touchpad-page.cpp +@@ -13,11 +13,11 @@ + */ + + #include "touchpad-page.h" +-#include "kcm-manager.h" + #include + #include + #include + #include ++#include "kcm-manager.h" + #include "touchPad_backEnd_proxy.h" + #include "ui_touchpad-page.h" + +@@ -204,35 +204,49 @@ void TouchPadPage::initComponent() + }, + Qt::QueuedConnection); + +- //打字时触摸板禁用 +- m_disabelWhileTyping = m_touchPadInterface->disable_while_typing(); +- ui->checkBox_disable_while_typing->setChecked(m_disabelWhileTyping); +- connect(ui->checkBox_disable_while_typing, &KiranSwitchButton::toggled, +- [this](bool disabelWhileTyping) { +- m_disabelWhileTyping = disabelWhileTyping; +- m_touchPadInterface->setDisable_while_typing(m_disabelWhileTyping); +- }); +- connect( +- m_touchPadInterface.data(), &TouchPadBackEndProxy::disable_while_typingChanged, this, +- [this](bool value) { +- setValue(ui->checkBox_disable_while_typing, m_disabelWhileTyping, value); +- }, +- Qt::QueuedConnection); ++ if (m_touchPadInterface->disable_while_typing_support()) ++ { ++ //打字时触摸板禁用 ++ m_disabelWhileTyping = m_touchPadInterface->disable_while_typing(); ++ ui->checkBox_disable_while_typing->setChecked(m_disabelWhileTyping); ++ connect(ui->checkBox_disable_while_typing, &KiranSwitchButton::toggled, ++ [this](bool disabelWhileTyping) { ++ m_disabelWhileTyping = disabelWhileTyping; ++ m_touchPadInterface->setDisable_while_typing(m_disabelWhileTyping); ++ }); ++ connect( ++ m_touchPadInterface.data(), &TouchPadBackEndProxy::disable_while_typingChanged, this, ++ [this](bool value) { ++ setValue(ui->checkBox_disable_while_typing, m_disabelWhileTyping, value); ++ }, ++ Qt::QueuedConnection); ++ } ++ else ++ { ++ ui->widget_disable_while_typing->hide(); ++ } + +- //轻击(不按下)触摸板功能是否生效 +- m_tapToClick = m_touchPadInterface->tap_to_click(); +- ui->checkBox_tap_to_click->setChecked(m_tapToClick); +- connect(ui->checkBox_tap_to_click, &KiranSwitchButton::toggled, +- [this](bool isTapToClick) { +- m_tapToClick = isTapToClick; +- m_touchPadInterface->setTap_to_click(m_tapToClick); +- }); +- connect( +- m_touchPadInterface.data(), &TouchPadBackEndProxy::tap_to_clickChanged, this, +- [this](bool value) { +- setValue(ui->checkBox_tap_to_click, m_tapToClick, value); +- }, +- Qt::QueuedConnection); ++ if (m_touchPadInterface->tap_to_click_support()) ++ { ++ //轻击(不按下)触摸板功能是否生效 ++ m_tapToClick = m_touchPadInterface->tap_to_click(); ++ ui->checkBox_tap_to_click->setChecked(m_tapToClick); ++ connect(ui->checkBox_tap_to_click, &KiranSwitchButton::toggled, ++ [this](bool isTapToClick) { ++ m_tapToClick = isTapToClick; ++ m_touchPadInterface->setTap_to_click(m_tapToClick); ++ }); ++ connect( ++ m_touchPadInterface.data(), &TouchPadBackEndProxy::tap_to_clickChanged, this, ++ [this](bool value) { ++ setValue(ui->checkBox_tap_to_click, m_tapToClick, value); ++ }, ++ Qt::QueuedConnection); ++ } ++ else ++ { ++ ui->widget_tap_to_click->hide(); ++ } + } + + void TouchPadPage::setValue(KiranSwitchButton *receiveWidget, bool &origVal, bool newVal) +-- +2.27.0 + diff --git a/kiran-control-panel.spec b/kiran-control-panel.spec index d4ee58d65de192e4ecea33ee67c15ed0127d2a38..322a0dcb8deaa066eb9ae74909119fa331657a8d 100644 --- a/kiran-control-panel.spec +++ b/kiran-control-panel.spec @@ -1,6 +1,6 @@ Name: kiran-control-panel Version: 2.6.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Kiran Control Panel Summary(zh_CN): Kiran桌面控制面板 @@ -12,6 +12,7 @@ Patch001: 0001-fix-keybinding-don-t-convert-normal-key-if-use-shift.patch Patch002: 0002-fix-audio-network-Compatible-for-versions-below-5.15.patch Patch003: 0003-fix-power-Fix-has-really-battery-while-it-is-present.patch Patch004: 0004-fix-network-Fix-network-configuration-filtering-for-.patch +Patch005: 0005-fix-touchpad-Fix-touchpad-display-with-the-type-psmo.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 3.2 @@ -161,6 +162,9 @@ make %{?_smp_mflags} rm -rf %{buildroot} %changelog +* Wed Apr 17 2024 meizhigang - 2.6.1-6 +- KYOS-B: Fix touchpad display with the type psmouse (#34878) + * Tue Apr 16 2024 liuxinhao - 2.6.1-5 - KYOS-B: Fix network configuration filtering for device binding and settings update issue(#32685)