add add-switchuser-no-limits-ukui-session.patch

(cherry picked from commit d9c7b5c88df97a6da655eec1eb8e09ba8bbaaed9)
This commit is contained in:
peijiankang 2023-09-07 15:09:10 +08:00 committed by openeuler-sync-bot
parent 8ea4476c13
commit d253588399
3 changed files with 52 additions and 28 deletions

View File

@ -0,0 +1,42 @@
From 875737c14d243792680c8ed2349cb73a9eadc197 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 4 Sep 2023 18:16:05 +0800
Subject: [PATCH] add switchuser no limits
---
tools/mainwindow.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/mainwindow.cpp b/tools/mainwindow.cpp
index e077574..0f65f27 100644
--- a/tools/mainwindow.cpp
+++ b/tools/mainwindow.cpp
@@ -200,6 +200,7 @@ MainWindow::MainWindow(bool a, bool b, QWidget *parent) : QMainWindow(parent)
int hideNum = 7;
//Make a hash-map to store tableNum-to-lastWidget
+ /*
if (m_power->canAction(UkuiPower::PowerHibernate)) {
isHibernateHide = false;
hideNum--;
@@ -209,7 +210,7 @@ MainWindow::MainWindow(bool a, bool b, QWidget *parent) : QMainWindow(parent)
isSuspendHide = false;
hideNum--;
}
-
+ */
if (m_power->canAction(UkuiPower::PowerLogout)) {
isLogoutHide = false;
hideNum--;
@@ -225,7 +226,7 @@ MainWindow::MainWindow(bool a, bool b, QWidget *parent) : QMainWindow(parent)
hideNum--;
}
- if (LockChecker::getCachedUsers() > 1 && m_power->canAction(UkuiPower::PowerSwitchUser)) {
+ if (m_power->canAction(UkuiPower::PowerSwitchUser)) {
isSwitchuserHide = false;
hideNum--;
}
--
2.33.0

View File

@ -1,25 +0,0 @@
From 6cd01b774cade76be2f80e894c5ec1b6379be34a Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Wed, 14 Jun 2023 19:00:20 +0800
Subject: [PATCH] disable Suspend and Sleep of ukui-session-manager
---
tools/mainwindow.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/mainwindow.cpp b/tools/mainwindow.cpp
index 50fde29..e077574 100644
--- a/tools/mainwindow.cpp
+++ b/tools/mainwindow.cpp
@@ -351,6 +351,8 @@ MainWindow::MainWindow(bool a, bool b, QWidget *parent) : QMainWindow(parent)
qDebug() << "m_btnWidget FixedHeight000:" << m_btnWidget->width() << m_scrollArea->width();
qApp->installNativeEventFilter(this);
+ m_hibernateBtn->hide();
+ m_suspendBtn->hide();
}
MainWindow::~MainWindow()
--
2.33.0

View File

@ -1,13 +1,13 @@
Name: ukui-session-manager
Version: 3.1.0
Release: 4
Release: 5
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
Patch03: add-switchuser-no-limits-ukui-session.patch
%endif
BuildRequires: cmake
@ -52,8 +52,8 @@ Provides: x-session-manager
%prep
%setup -q
%if 0%{?kylin}
%patch01 -p1
%patch02 -p1
%patch03 -p1
%endif
%build
@ -86,6 +86,13 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/man/man1/ukui-session-tools.1.gz
%changelog
* Mon Sep 04 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add patch3:add-switchuser-no-limits-ukui-session.patch
rm disable-Suspend-and-Sleep-of-ukui-session-manager.patch
* Mon Jul 10 2023 huayadong <huayadong@kylinos.cn> - 3.1.0-4
- Type:bugfix
- ID:NA