git: 08ff7700f244 - main - x11/xidle: fix double triggering on screen unlock
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Dec 2023 09:56:00 UTC
The branch main has been updated by novel:
URL: https://cgit.FreeBSD.org/ports/commit/?id=08ff7700f244f5157f03dbb1a67ade35d32ed4c4
commit 08ff7700f244f5157f03dbb1a67ade35d32ed4c4
Author: Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2023-12-24 09:46:21 +0000
Commit: Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2023-12-24 09:46:21 +0000
x11/xidle: fix double triggering on screen unlock
A problem reported that xidle triggers twice: the first one when it
reaches idle timeout and locks the screen (which is expected), and the
second time immediately when the screen is unlocked (which is
undesired).
The problem is that, apparently, the XScreenServer extension, which
xidle uses, sends ScreenSaverOn on locking and ScreenSaverOff on
unlocking. Currently, xidle doesn't filter events by locking state, so
it locks the screen again when the ScreenSaverOff event comes in.
The fix is to run a screensaver only on the ScreenSaverOn event.
PR: 275761
---
x11/xidle/Makefile | 1 +
x11/xidle/files/patch-xidle.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/x11/xidle/Makefile b/x11/xidle/Makefile
index eb849d523729..120112006b86 100644
--- a/x11/xidle/Makefile
+++ b/x11/xidle/Makefile
@@ -1,5 +1,6 @@
PORTNAME= xidle
PORTVERSION= 26052015
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= LOCAL/novel
diff --git a/x11/xidle/files/patch-xidle.c b/x11/xidle/files/patch-xidle.c
new file mode 100644
index 000000000000..edfd04993062
--- /dev/null
+++ b/x11/xidle/files/patch-xidle.c
@@ -0,0 +1,11 @@
+--- xidle.c.orig 2023-12-17 16:06:14 UTC
++++ xidle.c
+@@ -426,7 +426,7 @@ main(int argc, char **argv)
+ * Was for real or due to terminal
+ * switching or a locking program?
+ */
+- if (timeout > 0 && se->forced == False)
++ if (timeout > 0 && se->forced == False && se->state == ScreenSaverOn)
+ action(&x, args);
+ }
+ break;