feature(session): Add always show exit window flag.
- 添加总是显示退出窗口标志位 Signed-off-by: huangjiawen <huangjiawen@kylinsec.com.cn>
This commit is contained in:
parent
e3caaa449d
commit
bc49085b38
71
0001-feature-session-Add-always-show-exit-window-flag.patch
Normal file
71
0001-feature-session-Add-always-show-exit-window-flag.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 49da14ad556935f475a538090a7c3648485d3485 Mon Sep 17 00:00:00 2001
|
||||
From: huangjiawen <huangjiawen@kylinsec.com.cn>
|
||||
Date: Wed, 31 May 2023 17:31:48 +0800
|
||||
Subject: [PATCH] feature(session): Add always show exit window flag.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 添加总是显示退出窗口标志位
|
||||
|
||||
Signed-off-by: huangjiawen <huangjiawen@kylinsec.com.cn>
|
||||
---
|
||||
data/com.kylinsec.kiran.session-manager.gschema.xml.in | 6 +++++-
|
||||
include/ksm-i.h | 4 +++-
|
||||
src/core/session-manager.cpp | 3 ++-
|
||||
3 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/data/com.kylinsec.kiran.session-manager.gschema.xml.in b/data/com.kylinsec.kiran.session-manager.gschema.xml.in
|
||||
index b71dd3e..313d055 100644
|
||||
--- a/data/com.kylinsec.kiran.session-manager.gschema.xml.in
|
||||
+++ b/data/com.kylinsec.kiran.session-manager.gschema.xml.in
|
||||
@@ -15,6 +15,10 @@
|
||||
<default>true</default>
|
||||
<description>Whether lock screen when the computer is hibernate.</description>
|
||||
</key>
|
||||
- </schema>
|
||||
|
||||
+ <key name="always-show-exit-window" type="b">
|
||||
+ <default>false</default>
|
||||
+ <description>Set whether to always show the exit window.</description>
|
||||
+ </key>
|
||||
+ </schema>
|
||||
</schemalist>
|
||||
diff --git a/include/ksm-i.h b/include/ksm-i.h
|
||||
index ca4bb86..fb49a59 100644
|
||||
--- a/include/ksm-i.h
|
||||
+++ b/include/ksm-i.h
|
||||
@@ -42,6 +42,8 @@ extern "C"
|
||||
#define KSM_SCHEMA_KEY_SCREEN_LOCKED_WHEN_SUSPEND "screen-locked-when-suspend"
|
||||
// 休眠时是否锁定屏幕
|
||||
#define KSM_SCHEMA_KEY_SCREEN_LOCKED_WHEN_HIBERNATE "screen-locked-when-hibernate"
|
||||
+// 退出时是否显示退出窗口
|
||||
+#define KSM_SCHEMA_KEY_ALWAYS_SHOW_EXIT_WINDOW "always-show-exit-window"
|
||||
|
||||
// JK: json key
|
||||
#define KSM_INHIBITOR_JK_COOKIE "cookie"
|
||||
@@ -96,4 +98,4 @@ extern "C"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
||||
diff --git a/src/core/session-manager.cpp b/src/core/session-manager.cpp
|
||||
index 12dcc15..6ca79be 100644
|
||||
--- a/src/core/session-manager.cpp
|
||||
+++ b/src/core/session-manager.cpp
|
||||
@@ -725,8 +725,9 @@ void SessionManager::queryEndSessionComplete()
|
||||
this->m_waitingClientsTimeoutID->disconnect();
|
||||
this->m_waitingClientsTimeoutID->stop();
|
||||
|
||||
+ auto showExitWindow = this->m_settings->get(KSM_SCHEMA_KEY_ALWAYS_SHOW_EXIT_WINDOW).toBool();
|
||||
// 如果不存在退出会话的抑制器,则直接进入下一个阶段
|
||||
- if (!this->m_inhibitorManager->hasInhibitor(KSMInhibitorFlag::KSM_INHIBITOR_FLAG_QUIT))
|
||||
+ if (!showExitWindow && !this->m_inhibitorManager->hasInhibitor(KSMInhibitorFlag::KSM_INHIBITOR_FLAG_QUIT))
|
||||
{
|
||||
this->startNextPhase();
|
||||
return;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
Name: kiran-session-manager
|
||||
Version: 2.5.0
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Session manager for KIRAN desktop environment
|
||||
|
||||
License: MulanPSL-2.0
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch1000: 0001-feature-lockscreen-Add-LockScreenWhenHibernate-and-L.patch
|
||||
Patch1001: 0001-feature-session-Add-always-show-exit-window-flag.patch
|
||||
|
||||
|
||||
BuildRequires: cmake >= 3.2
|
||||
@ -86,6 +87,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 31 2023 huangjiawen <huangjiawen@kylinsec.com.cn> - 2.5.0-5
|
||||
- KYOS-F: Add always show exit window flag.
|
||||
|
||||
* Wed May 10 2023 tangjie02 <tangjie02@kylinsec.com.cn> - 2.5.0-4
|
||||
- KYOS-F: Add LockScreenWhenHibernate and LockScreenWhenSuspend functions.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user