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 <contact@stacyharper.net>
master
Maxim Karasev 3 years ago committed by Stacy Harper
parent 905b69ebf1
commit e4cc9a90a2
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 5
      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

Loading…
Cancel
Save