!136 Fix handling Dbus method calls returning twice causing crashes(#35488),and touchpad control with the type psmouse(#34878)

From: @liubuguiii 
Reviewed-by: @stonefly128 
Signed-off-by: @stonefly128
This commit is contained in:
openeuler-ci-bot 2024-04-19 06:44:55 +00:00 committed by Gitee
commit b3a685f1d6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,54 @@
From 06a5dfbf0117169b179d46aca05632779cc603d7 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Wed, 17 Apr 2024 20:28:58 +0800
Subject: [PATCH 16/16] fix(display): Fix handling Dbus method calls returning
twice causing crashes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复处理Dbus方法调用返回两次导致崩溃
#35488
---
plugins/display/display-monitor.cpp | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/plugins/display/display-monitor.cpp b/plugins/display/display-monitor.cpp
index 49f23ff..5402c5d 100644
--- a/plugins/display/display-monitor.cpp
+++ b/plugins/display/display-monitor.cpp
@@ -1,14 +1,14 @@
/**
- * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd.
+ * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd.
* kiran-cc-daemon is licensed under Mulan PSL v2.
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
- * http://license.coscl.org.cn/MulanPSL2
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
- * See the Mulan PSL v2 for more details.
- *
+ * http://license.coscl.org.cn/MulanPSL2
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ * See the Mulan PSL v2 for more details.
+ *
* Author: tangjie02 <tangjie02@kylinos.com.cn>
*/
@@ -200,6 +200,7 @@ void DisplayMonitor::Enable(bool enabled, MethodInvocation &invocation)
if (enabled == this->enabled_get())
{
invocation.ret();
+ return;
}
// 如果状态发生了变化而且是关闭最后一个开启的显示器,则禁止该操作(至少保证有一个显示器时开启的)
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: kiran-cc-daemon
Version: 2.6.1
Release: 12%{?dist}
Release: 14%{?dist}
Summary: DBus daemon for Kiran Desktop
License: MulanPSL-2.0
@ -23,6 +23,7 @@ Patch0011: 0011-fix-audio-Fix-audio-stream-volume-retain-while-set-m.patch
Patch0012: 0012-fix-power-Fix-battery-charging-and-discharging-time.patch
Patch0013: 0013-fix-power-Fix-sys-backlight-set-only-in-notebook-wit.patch
Patch0014: 0014-fix-touchpad-Fix-touchpad-control-with-the-type-psmo.patch
Patch0015: 0015-fix-display-Fix-handling-Dbus-method-calls-returning.patch
BuildRequires: cmake >= 3.2
BuildRequires: pkgconfig(glibmm-2.4)
@ -209,6 +210,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
%changelog
* Thu Apr 18 2024 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.6.1-14
- KYOS-B: Fix handling Dbus method calls returning twice causing crashes(#35488)
* Wed Apr 17 2024 meizhigang <meizhigang@kylinsec.com.cn> - 2.6.1-12
- KYOS-B: Fix touchpad control with the type psmouse (#34878)