From 5e6907dc188dd0f3927a47d5844daa632428ad82 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 25 Jul 2025 22:03:18 +0900 Subject: kdesktop: make sure the saver/lock remains responsive even when invokation has failed. This could happen for example when a popup menu is open and the saver autolock timeout expires. Before this commit, both kdesktop and the X11 server would be in a dirty start and the saver/lock would either not work anymore or not hide the windows on the screen. It was necessary to kill and restart kdesktop to restore proper functionality. Note: the conditional return value of 0 or 12 at main.cpp:554 is a temporary measure to prevent the screen to forcibly lock if the user forgets a popup menu open and the saver timeout expires. Once the issue with input grabbing is solved, we can remove the conditional return value and simply return an error in such condition. Same applies to the variable trinity_desktop_lock_failed_grab, which will no longer be needed in such case.o Signed-off-by: Michele Calgaro --- kdesktop/lockeng.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kdesktop/lockeng.cpp') diff --git a/kdesktop/lockeng.cpp b/kdesktop/lockeng.cpp index 1392c9db3..57a42c9b5 100644 --- a/kdesktop/lockeng.cpp +++ b/kdesktop/lockeng.cpp @@ -108,7 +108,7 @@ SaverEngine::SaverEngine() mSignalAction.sa_flags = 0; sigaction(SIGUSR2, &mSignalAction, 0L); - // handle SIGTTIN + // handle SIGTTIN (as custom user signal rather than its inherent meaning) mSignalAction.sa_handler= sigttin_handler; sigemptyset(&(mSignalAction.sa_mask)); sigaddset(&(mSignalAction.sa_mask), SIGTTIN); -- cgit v1.2.3