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>
This commit is contained in:
parent
905b69ebf1
commit
e4cc9a90a2
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue