diff --git a/ukui-screensaver-3.1.1-fix-unable-to-input-password.patch b/ukui-screensaver-3.1.1-fix-unable-to-input-password.patch new file mode 100644 index 0000000..88d1ba8 --- /dev/null +++ b/ukui-screensaver-3.1.1-fix-unable-to-input-password.patch @@ -0,0 +1,44 @@ +From 6b89a0dbab8b63644a25eb89e404ce2ceec24503 Mon Sep 17 00:00:00 2001 +From: huayadong +Date: Tue, 19 Nov 2024 10:52:43 +0800 +Subject: [PATCH] fix unable to input password + +--- + src/lockwidget.cpp | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/lockwidget.cpp b/src/lockwidget.cpp +index ac11367..582c25d 100644 +--- a/src/lockwidget.cpp ++++ b/src/lockwidget.cpp +@@ -42,6 +42,7 @@ + #include "commonfunc.h" + #include "hoverwidget.h" + #include "kylinnm.h" ++#include + + #include + #include +@@ -681,12 +682,18 @@ void LockWidget::onUserMenuTrigged(QAction *action) + { + qDebug() << action->data().toString() << "selected"; + ++ QString userName = action->data().toString(); ++ struct passwd *pw = getpwuid(geteuid()); ++ QString localname = QString::fromLocal8Bit(pw->pw_name); ++ if (userName.compare(localname) == 0) { ++ return; ++ } ++ + if(authDialog) + { + authDialog->stopAuth(); + } + +- QString userName = action->data().toString(); + for (int i =0; i < list.count(); i++) + { + if(list.at(i)->objectName() == userName){ +-- +2.46.0 + diff --git a/ukui-screensaver.spec b/ukui-screensaver.spec index 54671a1..27208b2 100644 --- a/ukui-screensaver.spec +++ b/ukui-screensaver.spec @@ -1,6 +1,6 @@ Name: ukui-screensaver Version: 3.1.1 -Release: 7 +Release: 8 Summary: Screensaver for UKUI desktop environment License: GPL-3+ and GPL-2+ URL: http://www.ukui.org @@ -12,6 +12,8 @@ Patch03: disable-Suspend-and-Sleep-of-ukui-screensaver.patch Patch04: add-switchuser-no-limits-in-ukui-screensaver.patch %endif Patch05: 0001-use-QRandomGenerator-to-generate-random-numbers.patch +Patch06: ukui-screensaver-3.1.1-fix-unable-to-input-password.patch + BuildRequires: cmake BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtx11extras-devel @@ -50,6 +52,7 @@ fi %patch 4 -p1 %endif %patch 5 -p1 +%patch 6 -p1 %build cmake . @@ -84,6 +87,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null ||: %{_prefix}/lib/ukui-screensaver/screensaver-focus-helper %changelog +* Wed Nov 20 2024 huayadong - 3.1.1-8 +- add patch6:ukui-screensaver-3.1.1-fix-unable-to-input-password.patch + * Fri Apr 26 2024 houhongxun - 3.1.1-7 - use QRandomGenerator to generate random numbers