disable Suspend and Sleep of ukui-screensaver

(cherry picked from commit d634f7c1d60e7d9c349e23a55e9908e913ca9f22)
This commit is contained in:
peijiankang 2023-06-14 16:00:17 +08:00 committed by openeuler-sync-bot
parent c64020572b
commit a55e04f587
2 changed files with 50 additions and 3 deletions

View File

@ -0,0 +1,36 @@
From b38417c0327894a8165a9ea7eda7db4cbf01531a Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Wed, 14 Jun 2023 15:55:43 +0800
Subject: [PATCH] disable Suspend and Sleep of ukui-screensaver
---
src/powermanager.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/powermanager.cpp b/src/powermanager.cpp
index 5b3a23f..e854112 100644
--- a/src/powermanager.cpp
+++ b/src/powermanager.cpp
@@ -59,7 +59,7 @@ PowerManager::PowerManager(QWidget *parent)
"org.gnome.SessionManager",
QDBusConnection::sessionBus(),
this);
-
+/*
loginInterface = new QDBusInterface(login1Service,
login1Path,
login1ManagerInterface,
@@ -79,7 +79,9 @@ PowerManager::PowerManager(QWidget *parent)
}else{
canHibernate = false;
}
-
+*/
+ canSuspend = false;
+ canHibernate = false;
initUI();
resize((ITEM_WIDTH+ITEM_SPACING*2)*this->count()-ITEM_SPACING*2, ITEM_HEIGHT+ITEM_SPACING*2);
//setCurrentRow(0);
--
2.33.0

View File

@ -1,13 +1,15 @@
Name: ukui-screensaver
Version: 3.1.1
Release: 4
Release: 5
Summary: Screensaver for UKUI desktop environment
License: GPL-3+ and GPL-2+
URL: http://www.ukui.org
Source0: %{name}-%{version}.tar.gz
Patch01: 0001-fix-root-can-not-input-passwd-bug.patch
Patch02: 0002-fix-build-compile-error.patch
%if 0%{?kylin}
Patch03: disable-Suspend-and-Sleep-of-ukui-screensaver.patch
%endif
BuildRequires: cmake
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtx11extras-devel
@ -41,10 +43,13 @@ provided by biometric-auth service.
if [ -e "/usr/include/glib-2.0/gio/gunixfdlist.h" ]; then
%patch02 -p1
fi
%if 0%{?kylin}
%patch03 -p1
%endif
%build
cmake .
make -j4
%{make_build}
%install
rm -rf $RPM_BUILD_ROOT
@ -75,6 +80,12 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null ||:
%{_prefix}/lib/ukui-screensaver/screensaver-focus-helper
%changelog
* Wed Jun 14 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: disable Suspend and Sleep of ukui-screensaver
* Thu May 25 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-4
- update glib2 error