Browse Source

Work around bug that caused xautolock to stop working

master
mid-kid 8 years ago
parent
commit
3b41729a1c
  1. 48
      satellites/extrafiles/xautolock/xautolock-2.2-do-not-restart.patch
  2. 2
      satellites/xautolock.sat

48
satellites/extrafiles/xautolock/xautolock-2.2-do-not-restart.patch

@ -0,0 +1,48 @@
# Rationale:
# After xautolock -restart is called, it simply stops working.
# I'm not exactly sure why that happens, but I'm not up for researching that.
# This problem comes into play when xdg-screensaver uses the -restart option
# simply because there is no other way to reset the lock timer.
# Since a few well-known (video player) applications continuously keep calling
# xdg-screensaver reset to avoid the lockscreen being triggered, this problem
# can be observed after running those applications.
# The expected behavior is resetting the lock timer, so instead of wasting
# resources actually restarting the entire application, why not simply
# actually reset the lock timer?
+++ src/message.c
@@ -100,12 +100,7 @@
static void
restartByMessage (Display* d, Window root)
{
- if (!secure)
- {
- XDeleteProperty (d, root, semaphore);
- XFlush (d);
- execv (argArray[0], argArray);
- }
+ if (!secure) resetTriggers();
}
/*
+++ src/options.c
@@ -595,7 +595,7 @@
error0 (" -toggle : toggle a running xautolock.\n");
error0 (" -locknow : tell a running xautolock to lock.\n");
error0 (" -unlocknow : tell a running xautolock to unlock.\n");
- error0 (" -restart : tell a running xautolock to restart.\n");
+ error0 (" -restart : tell a running xautolock to reset the lock timer.\n");
error0 (" -exit : kill a running xautolock.\n");
error0 (" -secure : ignore enable, disable, toggle, locknow\n");
error0 (" unlocknow, and restart messages.\n");
+++ xautolock.man
@@ -270,8 +270,7 @@
.TP
\fB\-restart\fR
Causes an already running xautolock process (if there is one and
-it does not have \fB\-secure\fR switched on) to restart. In any
-case, the current invocation of xautolock exits.
+it does not have \fB\-secure\fR switched on) to reset the lock timer.
.SH RESOURCES
.TP 16

2
satellites/xautolock.sat

@ -6,10 +6,12 @@ version=2.2
misc_debian_download 5.1 \ misc_debian_download 5.1 \
'd3d2fefe3345fa380f4e3331b9f13ba3' \ 'd3d2fefe3345fa380f4e3331b9f13ba3' \
'9526347a202694ad235d731d9d3de91f' '9526347a202694ad235d731d9d3de91f'
extrafile "$name-$orig_version-do-not-restart.patch"
header_end header_end
cd "$name-$version" cd "$name-$version"
misc_debian_patch misc_debian_patch
patch -p0 -i "../$name-$orig_version-do-not-restart.patch"
xmkmf xmkmf
make install \ make install \

Loading…
Cancel
Save