From ef7b2f72801ea153952193deea2efb75a1c746ce Mon Sep 17 00:00:00 2001 From: huayadong Date: Fri, 21 Jul 2023 09:53:08 +0800 Subject: [PATCH] fix-ukui-kwin-x11-coredump (cherry picked from commit cf6ac3e44b230d0ff0b76815aeedf2f8e4681f42) --- ...1.0-kylin-fix-ukui-kwin-x11-coredump.patch | 57 +++++++++++++++++++ ukui-session-manager.spec | 10 +++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 ukui-session-manager-3.1.0-kylin-fix-ukui-kwin-x11-coredump.patch diff --git a/ukui-session-manager-3.1.0-kylin-fix-ukui-kwin-x11-coredump.patch b/ukui-session-manager-3.1.0-kylin-fix-ukui-kwin-x11-coredump.patch new file mode 100644 index 0000000..ddef65d --- /dev/null +++ b/ukui-session-manager-3.1.0-kylin-fix-ukui-kwin-x11-coredump.patch @@ -0,0 +1,57 @@ +diff -Naur ukui-session-manager-3.1.0/ukui-session/ukuismserver.cpp ukui-session-manager-3.1.0~/ukui-session/ukuismserver.cpp +--- ukui-session-manager-3.1.0/ukui-session/ukuismserver.cpp 2022-04-20 17:40:57.000000000 +0800 ++++ ukui-session-manager-3.1.0~/ukui-session/ukuismserver.cpp 2023-07-09 13:49:42.930414204 +0800 +@@ -1065,22 +1065,28 @@ + + void UKUISMServer::completeKilling() + { ++// if (m_state == Killing) { ++// //这一段的含义是只要客户端列表中还有非窗管的客户端存在,则等待,直到客户端中只有一个窗管,则开始杀死窗管 ++// bool wait = false; ++// foreach (UKUISMClient *c, m_clients) { ++// if (isWM(c)) { ++// continue; ++// } ++// wait = true; ++// } ++ ++// if (wait) { ++// return; ++// } ++ ++// // killWM(); ++// //修改为不杀死窗管,直接结束会话 ++// killingCompleted(); ++// } ++// dy use default kde method + if (m_state == Killing) { +- //这一段的含义是只要客户端列表中还有非窗管的客户端存在,则等待,直到客户端中只有一个窗管,则开始杀死窗管 +- bool wait = false; +- foreach (UKUISMClient *c, m_clients) { +- if (isWM(c)) { +- continue; +- } +- wait = true; +- } +- +- if (wait) { ++ if (!m_clients.isEmpty()) // still waiting for clients to go away + return; +- } +- +-// killWM(); +- //修改为不杀死窗管,直接结束会话 + killingCompleted(); + } + } +@@ -1145,7 +1151,9 @@ + void UKUISMServer::killingCompleted() + { + emit logoutFinished(); +-// qApp->quit(); ++ //dy use default kde method ++ qApp->quit(); ++ return; + //目前不清楚如果不做清理会有什么影响,看日志没有发现问题,使用上也没有区别,但为了保险还是加上 + cleanUp(); + diff --git a/ukui-session-manager.spec b/ukui-session-manager.spec index 47cddf6..b9b31e1 100644 --- a/ukui-session-manager.spec +++ b/ukui-session-manager.spec @@ -1,12 +1,13 @@ Name: ukui-session-manager Version: 3.1.0 -Release: 3 +Release: 4 Summary: Session manager of the UKUI desktop environment License: GPL-2.0-or-later and GPL-3.0-or-later and LGPL-2.0-or-later URL: http://www.ukui.org Source0: %{name}-%{version}.tar.gz %if 0%{?kylin} Patch01: disable-Suspend-and-Sleep-of-ukui-session-manager.patch +Patch02: ukui-session-manager-3.1.0-kylin-fix-ukui-kwin-x11-coredump.patch %endif BuildRequires: cmake @@ -52,6 +53,7 @@ Provides: x-session-manager %setup -q %if 0%{?kylin} %patch01 -p1 +%patch02 -p1 %endif %build @@ -84,6 +86,12 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/man/man1/ukui-session-tools.1.gz %changelog +* Mon Jul 10 2023 huayadong - 3.1.0-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add patch2:ukui-session-manager-3.1.0-kylin-fix-ukui-kwin-x11-coredump.patch + * Wed Jun 14 2023 peijiankang - 3.1.0-3 - Type:bugfix - ID:NA