!140 fix(touchpad):Fix touchpad display with the type psmouse
From: @meizhigang Reviewed-by: @liubuguiii Signed-off-by: @liubuguiii
This commit is contained in:
commit
0f6729c45e
140
0005-fix-touchpad-Fix-touchpad-display-with-the-type-psmo.patch
Normal file
140
0005-fix-touchpad-Fix-touchpad-display-with-the-type-psmo.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From dec1b2e8501c3f20c83efa6c8d9f5124fccaf316 Mon Sep 17 00:00:00 2001
|
||||
From: meizhigang <meizhigang@kylinsec.com.cn>
|
||||
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.</description>
|
||||
</property>
|
||||
|
||||
+ <property name="disable_while_typing_support" type="b" access="readwrite">
|
||||
+ <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
+ <description>The support of disable while typing.</description>>
|
||||
+ </property>
|
||||
+
|
||||
+ <property name="tap_to_click_support" type="b" access="readwrite">
|
||||
+ <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
+ <description>The support of tap to click.</description>
|
||||
+ </property>
|
||||
+
|
||||
+ <property name="click_method_support" type="b" access="readwrite">
|
||||
+ <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
+ <description>The support of click method.</description>
|
||||
+ </property>
|
||||
+
|
||||
<property name="scroll_method" type="i" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<description>Enables a scroll method. Permitted methods are twofinger, edge and button.</description>
|
||||
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 <kiran-log/qt5-log-i.h>
|
||||
#include <kiran-session-daemon/touchpad-i.h>
|
||||
#include <QCheckBox>
|
||||
#include <QDBusConnection>
|
||||
+#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
|
||||
|
||||
@ -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 <meizhigang@kylinsec.com.cn> - 2.6.1-6
|
||||
- KYOS-B: Fix touchpad display with the type psmouse (#34878)
|
||||
|
||||
* Tue Apr 16 2024 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.6.1-5
|
||||
- KYOS-B: Fix network configuration filtering for device binding and settings update issue(#32685)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user