From 9e767bde39fd4ae69b92bc9cf1f040afcd8c0db2 Mon Sep 17 00:00:00 2001
From: Toshaan Bharvani <toshaan@powerel.org>
Date: Thu, 28 Dec 2023 16:15:02 +0100
Subject: [PATCH] initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
---
 SOURCES/xautolock-2.2-XSS-fix.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 SOURCES/xautolock-2.2-XSS-fix.patch

diff --git a/SOURCES/xautolock-2.2-XSS-fix.patch b/SOURCES/xautolock-2.2-XSS-fix.patch
new file mode 100644
index 0000000..135993a
--- /dev/null
+++ b/SOURCES/xautolock-2.2-XSS-fix.patch
@@ -0,0 +1,12 @@
+diff -up xautolock-2.2/src/engine.c.XSS-fix xautolock-2.2/src/engine.c
+--- xautolock-2.2/src/engine.c.XSS-fix	2007-12-28 18:15:26.000000000 +0100
++++ xautolock-2.2/src/engine.c	2008-03-17 14:24:16.000000000 +0100
+@@ -46,6 +46,8 @@ queryIdleTime (Display* d, Bool use_xidl
+     if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
+     XScreenSaverQueryInfo (d, DefaultRootWindow (d), mitInfo);
+     idleTime = mitInfo->idle;
++    if (mitInfo->state == ScreenSaverDisabled)
++	idleTime = 0;
+ #endif /* HasScreenSaver */
+   }
+