From 5eaff8d2e016ae9c350fc3ebd8cf136569ee4acc Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Thu, 18 Apr 2024 09:21:33 +0800 Subject: [PATCH] Fix handling Dbus method calls returning twice causing crashes(#35488),and touchpad control with the type psmouse(#34878) --- ...handling-Dbus-method-calls-returning.patch | 54 +++++++++++++++++++ kiran-cc-daemon.spec | 6 ++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 0015-fix-display-Fix-handling-Dbus-method-calls-returning.patch diff --git a/0015-fix-display-Fix-handling-Dbus-method-calls-returning.patch b/0015-fix-display-Fix-handling-Dbus-method-calls-returning.patch new file mode 100644 index 0000000..f8e4768 --- /dev/null +++ b/0015-fix-display-Fix-handling-Dbus-method-calls-returning.patch @@ -0,0 +1,54 @@ +From 06a5dfbf0117169b179d46aca05632779cc603d7 Mon Sep 17 00:00:00 2001 +From: liuxinhao +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 + */ + +@@ -200,6 +200,7 @@ void DisplayMonitor::Enable(bool enabled, MethodInvocation &invocation) + if (enabled == this->enabled_get()) + { + invocation.ret(); ++ return; + } + + // 如果状态发生了变化而且是关闭最后一个开启的显示器,则禁止该操作(至少保证有一个显示器时开启的) +-- +2.33.0 + diff --git a/kiran-cc-daemon.spec b/kiran-cc-daemon.spec index 567eb6e..ade5efc 100644 --- a/kiran-cc-daemon.spec +++ b/kiran-cc-daemon.spec @@ -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 - 2.6.1-14 +- KYOS-B: Fix handling Dbus method calls returning twice causing crashes(#35488) + * Wed Apr 17 2024 meizhigang - 2.6.1-12 - KYOS-B: Fix touchpad control with the type psmouse (#34878) -- Gitee