Cursor: implement initial touch support

Still TODO are:
- Touch support for drags
- Mapping input devices to outputs (necessary for good multi-monitor
touch support)

Co-authored-by: Daan Vanoverloop <daan@vanoverloop.xyz>
This commit is contained in:
Isaac Freund
2022-06-22 00:34:05 +02:00
parent bd03484b28
commit 2eb013e214
3 changed files with 134 additions and 38 deletions

View File

@ -112,7 +112,7 @@ fn handleDestroy(listener: *wl.Listener(*wlr.InputDevice), _: *wlr.InputDevice)
keyboard.deinit();
util.gpa.destroy(keyboard);
},
.pointer => {
.pointer, .touch => {
device.deinit();
util.gpa.destroy(device);
},
@ -121,6 +121,6 @@ fn handleDestroy(listener: *wl.Listener(*wlr.InputDevice), _: *wlr.InputDevice)
switch_device.deinit();
util.gpa.destroy(switch_device);
},
.touch, .tablet_tool, .tablet_pad => unreachable,
.tablet_tool, .tablet_pad => unreachable,
}
}