fix the switch function invalidation problem after turn off monitor, then logout and relogin session.
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
This commit is contained in:
parent
6c32f9e675
commit
f34d4fb9a8
@ -0,0 +1,60 @@
|
||||
From 975edfa981e6063c039863df74abd24a18e69804 Mon Sep 17 00:00:00 2001
|
||||
From: tangjie02 <tangjie02@kylinsec.com.cn>
|
||||
Date: Sun, 8 Oct 2023 11:04:08 +0800
|
||||
Subject: [PATCH] fix(display): fix the switch function invalidation problem
|
||||
after turn off monitor, then logout and relogin session.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复在关闭显示器后,注销再登录到会话后关闭功能失效问题。
|
||||
|
||||
Fixed #17149
|
||||
|
||||
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
|
||||
---
|
||||
plugins/display/display-manager.cpp | 21 +++++++++++----------
|
||||
1 file changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/plugins/display/display-manager.cpp b/plugins/display/display-manager.cpp
|
||||
index 10a4b61..bea2644 100644
|
||||
--- a/plugins/display/display-manager.cpp
|
||||
+++ b/plugins/display/display-manager.cpp
|
||||
@@ -436,16 +436,6 @@ bool DisplayManager::apply_screen_config(const ScreenConfigInfo &screen_config,
|
||||
monitor->name_get().c_str());
|
||||
}
|
||||
|
||||
- auto mode = monitor->match_best_mode(c_monitor.width(), c_monitor.height(), c_monitor.refresh_rate());
|
||||
- if (!mode)
|
||||
- {
|
||||
- KLOG_WARNING("Cannot match the mode. width: %d, height: %d, refresh: %.2f.",
|
||||
- c_monitor.width(),
|
||||
- c_monitor.height(),
|
||||
- c_monitor.refresh_rate());
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
if (!c_monitor.enabled())
|
||||
{
|
||||
monitor->enabled_set(false);
|
||||
@@ -457,6 +447,17 @@ bool DisplayManager::apply_screen_config(const ScreenConfigInfo &screen_config,
|
||||
}
|
||||
else
|
||||
{
|
||||
+ // 只有在显示器开启状态下才能取匹配mode,因为显示器关闭状态下c_monitor里面保持的分辨率都是0x0
|
||||
+ auto mode = monitor->match_best_mode(c_monitor.width(), c_monitor.height(), c_monitor.refresh_rate());
|
||||
+ if (!mode)
|
||||
+ {
|
||||
+ KLOG_WARNING("Cannot match the mode. width: %d, height: %d, refresh: %.2f.",
|
||||
+ c_monitor.width(),
|
||||
+ c_monitor.height(),
|
||||
+ c_monitor.refresh_rate());
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
monitor->enabled_set(true);
|
||||
monitor->x_set(c_monitor.x());
|
||||
monitor->y_set(c_monitor.y());
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
From 4d39214b78a856c591b76f445927f7d0edf8f5b7 Mon Sep 17 00:00:00 2001
|
||||
From a3d23ef293d4917395833ead79e8ce9c0a1bcdaf Mon Sep 17 00:00:00 2001
|
||||
From: wangtaozhi <wangtaozhi@kylinsec.com.cn>
|
||||
Date: Mon, 12 Jun 2023 10:47:23 +0800
|
||||
Date: Sat, 10 Jun 2023 12:02:17 +0800
|
||||
Subject: [PATCH] fix(systeminfo): Adjusting the reading method of cpu
|
||||
information,Resolve program crash issue when exiting the program
|
||||
MIME-Version: 1.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: kiran-cc-daemon
|
||||
Version: 2.5.1
|
||||
Release: 27
|
||||
Release: 30
|
||||
Summary: DBus daemon for Kiran Desktop
|
||||
|
||||
License: MulanPSL-2.0
|
||||
@ -31,6 +31,7 @@ Patch0021: 0001-fix-power-Fix-related-project-build-with-power-event.patch
|
||||
Patch0022: 0001-fix-display-Fix-multi-screen-auto-display-while-swit.patch
|
||||
Patch0023: 0001-fix-systeminfo-Fix-to-get-pci-info-for-multiple-devi.patch
|
||||
Patch0024: 0001-fix-plugin-remove-active-or-deactive-mate-plugin-cod.patch
|
||||
Patch0025: 0001-fix-display-fix-the-switch-function-invalidation-pro.patch
|
||||
|
||||
BuildRequires: cmake >= 3.2
|
||||
BuildRequires: pkgconfig(glibmm-2.4)
|
||||
@ -214,10 +215,18 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
|
||||
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
|
||||
|
||||
%changelog
|
||||
* Mon Sep 18 2023 yuanxing <yuanxing@kylinsec.com.cn> - 2.5.1-27
|
||||
- KYOS-F: add mate settings daemon plugin gschema override file
|
||||
* Sun Oct 8 2023 tangjie02 <tangjie02@kylinsec.com.cn> - 2.5.1-30
|
||||
- KYOS-B: fix the switch function invalidation problem after turn off monitor, then logout and relogin session.(#17149)
|
||||
|
||||
* Mon Sep 18 2023 yuanxing <yuanxing@kylinsec.com.cn> - 2.5.1-29
|
||||
- KYOS-F: don't close clipboard mate plugin
|
||||
|
||||
* Thu Sep 14 2023 yuanxing <yuanxing@kylinsec.com.cn> - 2.5.1-28
|
||||
- KYOS-F: remove active/deactive mate setting daemon plugin code
|
||||
|
||||
* Thu Sep 14 2023 yuanxing <yuanxing@kylinsec.com.cn> - 2.5.1-27
|
||||
- KYOS-F: add mate settings daemon plugin gschema override file
|
||||
|
||||
* Mon Sep 11 2023 longcheng <longcheng@kylinsec.com.cn> - 2.5.1-26
|
||||
- KYOS-B: change BuildRequires in redhat 7 (#14460)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user