From e4cc9a90a229f766c49b745a520bec2075ea839c Mon Sep 17 00:00:00 2001 From: Maxim Karasev Date: Tue, 31 Aug 2021 20:17:25 +0300 Subject: [PATCH] Use type:touch instead of DEVICE in swayinputevent in sxmo_wm This fixes handling input with locked screen on non-pinephone devices. I think really nobody would connect second touchscreen to a phone, so we can assume there's only one we need. Signed-off-by: Stacy Harper --- scripts/core/sxmo_wm.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/core/sxmo_wm.sh b/scripts/core/sxmo_wm.sh index 494d6c4..6e99396 100644 --- a/scripts/core/sxmo_wm.sh +++ b/scripts/core/sxmo_wm.sh @@ -58,7 +58,6 @@ xorginputevent() { } swayinputevent() { - DEVICE=1046:4097:Goodix_Capacitive_TouchScreen STATE=on if swaymsg -t get_inputs \ | jq -r '.[] | select(.type == "touch" ) | .libinput.send_events' \ @@ -67,9 +66,9 @@ swayinputevent() { fi if [ "$1" = on ] && [ "$STATE" != on ]; then - swaymsg -- input "$DEVICE" events enabled + swaymsg -- input type:touch events enabled elif [ "$1" = off ] && [ "$STATE" != off ] ; then - swaymsg -- input "$DEVICE" events disabled + swaymsg -- input type:touch events disabled else printf %s "$STATE" fi