Compare commits
10 Commits
edf01a93de
...
0a338dc879
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a338dc879 | ||
|
|
673be606e7 | ||
|
|
204843beac | ||
|
|
14b2696592 | ||
|
|
6a3cffb2bd | ||
|
|
5384c9bf4c | ||
|
|
486b40eec5 | ||
|
|
1df9d9ec18 | ||
|
|
e3373de659 | ||
|
|
a88d2f7cc2 |
@ -1,36 +0,0 @@
|
||||
From 74493a9280e5840b394f75d047317c4f68784ad3 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Thu, 15 Dec 2022 17:15:40 +0800
|
||||
Subject: [PATCH] fix(background,logind session): Deleting the dbus service
|
||||
file and pulling it up by systemd may cause problems, such as incorrect
|
||||
pulling time and failure to obtain the logind session address
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 去除dbus service文件,由systemd拉起可能会带来拉起时间点不对,获取logind session地址失败等问题
|
||||
---
|
||||
CMakeLists.txt | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fc48bc4..ee74108 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -113,7 +113,11 @@ configure_file(data/com.kylinsec.Kiran.ScreenSaver.service.in ${CMAKE_BINARY_DIR
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${SCREENSAVER_BIN_DIR})
|
||||
install(FILES ${QM_FILES} DESTINATION ${TRANSLATIONS_INSTALL_DIR})
|
||||
install(FILES ${DEVEL_HEADER} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/kiran-screensaver)
|
||||
-install(FILES ${CMAKE_BINARY_DIR}/com.kylinsec.Kiran.ScreenSaver.service DESTINATION ${DBUS_SERVICE_INSTALL_DIR})
|
||||
+#不安装dbus-1 service文件
|
||||
+#1. 若安装dbus-1service文件,kiran-session-daemon POWER插件可能过早拉起kiran-screensaver导致获取壁纸失败
|
||||
+#2. 若安装dbus-1service文件,systemd拉起kiran-screensaver可能出现通过Logind Manager的GetSessionByPID方法获取当前logind session dbus地址失败的问题
|
||||
+#经过考虑,kiran-screensaver只安装xdg/autostart文件,通过会话管理拉起
|
||||
+#install(FILES ${CMAKE_BINARY_DIR}/com.kylinsec.Kiran.ScreenSaver.service DESTINATION ${DBUS_SERVICE_INSTALL_DIR})
|
||||
install(FILES data/kiran-screensaver.desktop DESTINATION ${XDG_AUTO_START_DIR})
|
||||
install(FILES data/kiran-screensaver DESTINATION /${CMAKE_INSTALL_SYSCONFDIR}/pam.d/)
|
||||
install(FILES data/com.kylinsec.kiran.screensaver.gschema.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/)
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
From e49c123a61604ec14a38bde27995585c6ae6e673 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Fri, 11 Aug 2023 09:56:14 +0800
|
||||
Subject: [PATCH] fix(gsettings): screensaver-locker paths use the cmake macro
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修改screensaver-locker的插件路径为使用cmake宏
|
||||
|
||||
Closes #12303
|
||||
---
|
||||
CMakeLists.txt | 5 ++++-
|
||||
...ema.xml => com.kylinsec.kiran.screensaver.gschema.xml.in} | 2 +-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
rename data/{com.kylinsec.kiran.screensaver.gschema.xml => com.kylinsec.kiran.screensaver.gschema.xml.in} (90%)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bb60b39..aeab1e4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -120,4 +120,7 @@ install(FILES ${DEVEL_HEADER} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTAL
|
||||
#install(FILES ${CMAKE_BINARY_DIR}/com.kylinsec.Kiran.ScreenSaver.service DESTINATION ${DBUS_SERVICE_INSTALL_DIR})
|
||||
install(FILES data/kiran-screensaver.desktop DESTINATION ${XDG_AUTO_START_DIR})
|
||||
install(FILES data/kiran-screensaver DESTINATION /${CMAKE_INSTALL_SYSCONFDIR}/pam.d/)
|
||||
-install(FILES data/com.kylinsec.kiran.screensaver.gschema.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/)
|
||||
+
|
||||
+set(SCREENSAVER_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/kiran-screensaver)
|
||||
+configure_file(data/com.kylinsec.kiran.screensaver.gschema.xml.in ${CMAKE_BINARY_DIR}/com.kylinsec.kiran.screensaver.gschema.xml )
|
||||
+install(FILES ${CMAKE_BINARY_DIR}/com.kylinsec.kiran.screensaver.gschema.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/)
|
||||
\ No newline at end of file
|
||||
diff --git a/data/com.kylinsec.kiran.screensaver.gschema.xml b/data/com.kylinsec.kiran.screensaver.gschema.xml.in
|
||||
similarity index 90%
|
||||
rename from data/com.kylinsec.kiran.screensaver.gschema.xml
|
||||
rename to data/com.kylinsec.kiran.screensaver.gschema.xml.in
|
||||
index 17b6f20..d364f17 100644
|
||||
--- a/data/com.kylinsec.kiran.screensaver.gschema.xml
|
||||
+++ b/data/com.kylinsec.kiran.screensaver.gschema.xml.in
|
||||
@@ -2,7 +2,7 @@
|
||||
<schemalist>
|
||||
<schema id="com.kylinsec.kiran.screensaver" path="/com/kylinsec/kiran/screensaver/">
|
||||
<key name="screensaver-locker" type="s">
|
||||
- <default>"/usr/lib64/kiran-screensaver/libkiran-screensaver-dialog.so"</default>
|
||||
+ <default>"@SCREENSAVER_PLUGIN_DIR@/libkiran-screensaver-dialog.so"</default>
|
||||
</key>
|
||||
|
||||
<key name="idle-activation-lock" type="b">
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
From 506baacdce54a39307fa01d296b8eb2b9850226e Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Sat, 19 Aug 2023 16:03:29 +0800
|
||||
Subject: [PATCH] fix(grab): keyboard not released when mouse capture failed.
|
||||
cause keyboard cannot be typed
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复鼠标抓取失败时,未释放键盘.导致抓取判断为失败.导致后续键盘无法输入
|
||||
---
|
||||
src/grab/grab.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/grab/grab.cpp b/src/grab/grab.cpp
|
||||
index e7fed6c..3c4a079 100644
|
||||
--- a/src/grab/grab.cpp
|
||||
+++ b/src/grab/grab.cpp
|
||||
@@ -177,7 +177,7 @@ bool Grab::doGrab(WId wid, bool grabPointer)
|
||||
{
|
||||
int errCode = reply ? reply->status:1;
|
||||
KLOG_WARNING() << "grab pointer to" << wid << "failed!" << getGrabError(errCode);
|
||||
- xcb_ungrab_pointer(QX11Info::connection(), XCB_TIME_CURRENT_TIME);
|
||||
+ xcb_ungrab_keyboard(QX11Info::connection(), XCB_TIME_CURRENT_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
140
0003-fix-logout-Fixed-the-shutdown-of-the-screensaver-pro.patch
Normal file
140
0003-fix-logout-Fixed-the-shutdown-of-the-screensaver-pro.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From 5cf42cb04cac2926a4ee8c0c45ee795c3f77f51b Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Tue, 12 Sep 2023 15:01:41 +0800
|
||||
Subject: [PATCH] fix(logout): Fixed the shutdown of the screensaver process
|
||||
when the logout query phase window was closed
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复由于注销询问阶段,窗口被关闭导致屏保进程退出,后续无法锁屏的问题
|
||||
|
||||
Closes #15523
|
||||
---
|
||||
src/grab/grab.cpp | 21 ++++++++++++++++++++-
|
||||
src/grab/grab.h | 3 ++-
|
||||
src/grab/invisible-window.cpp | 6 ++++++
|
||||
src/grab/invisible-window.h | 6 ++++++
|
||||
src/main.cpp | 7 +++++++
|
||||
5 files changed, 41 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/grab/grab.cpp b/src/grab/grab.cpp
|
||||
index 3c4a079..8bffc7e 100644
|
||||
--- a/src/grab/grab.cpp
|
||||
+++ b/src/grab/grab.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <QX11Info>
|
||||
#include <memory>
|
||||
#include <unistd.h>
|
||||
+#include <QTimer>
|
||||
|
||||
using namespace Kiran::ScreenSaver;
|
||||
|
||||
@@ -72,13 +73,31 @@ Grab* Grab::getInstance()
|
||||
|
||||
Grab::~Grab()
|
||||
{
|
||||
- // delete m_invisibleWindow;
|
||||
+ delete m_recreateInvisibleWindowTimer;
|
||||
+ delete m_invisibleWindow;
|
||||
}
|
||||
|
||||
Grab::Grab()
|
||||
{
|
||||
m_invisibleWindow = new InvisibleWindow;
|
||||
m_invisibleWindow->show();
|
||||
+
|
||||
+ //NOTE:
|
||||
+ // #15523
|
||||
+ // xsmp SmSaveGlobal 询问退出阶段, QGuiApplicationPrivate::commitData会尝试关闭所有窗口
|
||||
+ // 该点会导致invisible window close
|
||||
+ // 通过感知close事件后,重新拉取invisible window避免注销取消后,无法抓取输入到离屏窗口之上的问题
|
||||
+ m_recreateInvisibleWindowTimer = new QTimer;
|
||||
+ m_recreateInvisibleWindowTimer->setSingleShot(true);
|
||||
+ m_recreateInvisibleWindowTimer->setInterval(0);
|
||||
+
|
||||
+ QObject::connect(m_recreateInvisibleWindowTimer,&QTimer::timeout,[this](){
|
||||
+ this->m_invisibleWindow->show();
|
||||
+ });
|
||||
+
|
||||
+ QObject::connect(m_invisibleWindow,&InvisibleWindow::windowClosed,[this](){
|
||||
+ this->m_recreateInvisibleWindowTimer->start();
|
||||
+ });
|
||||
}
|
||||
|
||||
void Grab::releaseGrab()
|
||||
diff --git a/src/grab/grab.h b/src/grab/grab.h
|
||||
index f4e3d16..c77273c 100644
|
||||
--- a/src/grab/grab.h
|
||||
+++ b/src/grab/grab.h
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <QWindow>
|
||||
|
||||
|
||||
-
|
||||
+class QTimer;
|
||||
namespace Kiran
|
||||
{
|
||||
namespace ScreenSaver
|
||||
@@ -53,6 +53,7 @@ private:
|
||||
private:
|
||||
InvisibleWindow* m_invisibleWindow = nullptr;
|
||||
WId m_grabWID = 0;
|
||||
+ QTimer* m_recreateInvisibleWindowTimer;
|
||||
};
|
||||
} // namespace ScreenSaver
|
||||
} // namespace Kiran
|
||||
diff --git a/src/grab/invisible-window.cpp b/src/grab/invisible-window.cpp
|
||||
index ddd51ae..59f93f5 100644
|
||||
--- a/src/grab/invisible-window.cpp
|
||||
+++ b/src/grab/invisible-window.cpp
|
||||
@@ -25,4 +25,10 @@ InvisibleWindow::InvisibleWindow(QWidget *parent)
|
||||
|
||||
InvisibleWindow::~InvisibleWindow()
|
||||
{
|
||||
+}
|
||||
+
|
||||
+void InvisibleWindow::closeEvent(QCloseEvent *event)
|
||||
+{
|
||||
+ emit windowClosed();
|
||||
+ QWidget::closeEvent(event);
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/grab/invisible-window.h b/src/grab/invisible-window.h
|
||||
index 1a51c00..08d0359 100644
|
||||
--- a/src/grab/invisible-window.h
|
||||
+++ b/src/grab/invisible-window.h
|
||||
@@ -30,6 +30,12 @@ class InvisibleWindow : public QWidget
|
||||
public:
|
||||
InvisibleWindow(QWidget* parent = nullptr);
|
||||
~InvisibleWindow();
|
||||
+
|
||||
+signals:
|
||||
+ void windowClosed();
|
||||
+
|
||||
+protected:
|
||||
+ void closeEvent(QCloseEvent *event) override;
|
||||
};
|
||||
} // namespace ScreenSaver
|
||||
} // namespace Kiran
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 777defe..4c1a9d7 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -28,6 +28,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
KiranApplication app(argc, argv);
|
||||
|
||||
+ //NOTE:
|
||||
+ // #15523
|
||||
+ // xsmp QueryEndSession 会话询问退出阶段
|
||||
+ // QxcbSessionManager -> QGuiApplicationPrivate::commitData将会尝试关闭所有窗口,导致进程退出
|
||||
+ // 屏保服务需加入该标识,窗口全部关闭时也不退出
|
||||
+ QGuiApplication::setQuitOnLastWindowClosed(false);
|
||||
+
|
||||
int xsetProcess = QProcess::execute("xset",QStringList() << "s" << "0" << "0");
|
||||
|
||||
auto translator = new QTranslator;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
kiran-screensaver-2.2.3.tar.gz
Normal file
BIN
kiran-screensaver-2.2.3.tar.gz
Normal file
Binary file not shown.
@ -1,13 +1,15 @@
|
||||
Name: kiran-screensaver
|
||||
Version: 2.2.2
|
||||
Release: 2
|
||||
Version: 2.2.3
|
||||
Release: 5
|
||||
Summary: Kiran Desktop Screensaver Backend
|
||||
Summary(zh_CN): kiran桌面屏保后端
|
||||
|
||||
License: MulanPSL-2.0
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch01: 0001-fix-background-logind-session-Deleting-the-dbus-serv.patch
|
||||
Patch0001: 0001-fix-gsettings-screensaver-locker-paths-use-the-cmake.patch
|
||||
Patch0002: 0002-fix-grab-keyboard-not-released-when-mouse-capture-fa.patch
|
||||
Patch0003: 0003-fix-logout-Fixed-the-shutdown-of-the-screensaver-pro.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
@ -71,6 +73,21 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Tue Sep 12 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.2.3-5
|
||||
- KYOS-B: Fixed the shutdown of the screensaver process when the logout query phase window was closed(#15523)
|
||||
|
||||
* Sat Aug 19 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.2.3-4
|
||||
- KYOS-B: fix keyboard not released when mouse capture failed. cause keyboard cannot be typed
|
||||
|
||||
* Fri Aug 11 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.2.3-2
|
||||
- KYOS-B: gsettings screensaver-locker paths use the cmake macro (#12303)
|
||||
|
||||
* Sun Jun 25 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.2.3-1
|
||||
- KYOS-B: where typing could not be done due to keyboard grab conflicts(#I7C0TD)
|
||||
|
||||
* Mon Apr 10 2023 wangyucheng <wangyucheng@kylinsec.om.cn> - 2.2.2-3
|
||||
- KYOS-T: add some translation
|
||||
|
||||
* Thu Dec 15 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.2.2-2
|
||||
- KYOS-F: Deleting the dbus service file and pulling it up by systemd may cause problems, such as incorrect pulling time and failure to obtain the logind session address
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user