mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-12-26 18:42:53 +00:00
Run prelock and postlock synchronously to avoid race condition
As reported in issue #285, running postlock in a subshell and immediately returning from lockselect() has a high chance of hitting `exit 0` before xset and dunstctl get a chance to execute. Run both prelock and postlock synchronously within lockselect().
This commit is contained in:
parent
c625f8b8a1
commit
1093ce51e6
1 changed files with 2 additions and 2 deletions
|
@ -278,7 +278,7 @@ postlock() {
|
|||
lockselect() {
|
||||
|
||||
echof act "Running prelock..."
|
||||
prelock &
|
||||
prelock
|
||||
|
||||
case "$1" in
|
||||
dim) if [ -f "$CUR_L_DIM" ]; then lock "$CUR_L_DIM"; else failsafe; fi ;;
|
||||
|
@ -291,7 +291,7 @@ lockselect() {
|
|||
esac
|
||||
|
||||
echof act "Running postlock..."
|
||||
postlock &
|
||||
postlock
|
||||
}
|
||||
|
||||
# calculate adjustments for hidpi displays
|
||||
|
|
Loading…
Reference in a new issue