aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Bogorodskiy <novel@FreeBSD.org>2023-12-24 09:46:21 +0000
committerRoman Bogorodskiy <novel@FreeBSD.org>2023-12-24 09:46:21 +0000
commit08ff7700f244f5157f03dbb1a67ade35d32ed4c4 (patch)
treed7abff88948d2752453fd30573ed5e45e3e7f0c3
parent5c82fb6dee0733d11dc6effabaef5004345b1c23 (diff)
downloadports-08ff7700f244f5157f03dbb1a67ade35d32ed4c4.tar.gz
ports-08ff7700f244f5157f03dbb1a67ade35d32ed4c4.zip
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
-rw-r--r--x11/xidle/Makefile1
-rw-r--r--x11/xidle/files/patch-xidle.c11
2 files changed, 12 insertions, 0 deletions
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;