Conversation
e91a1c2 to
63e8fb1
Compare
799bffd to
00932a7
Compare
| tablet_seat.add_tablet::<Self>(&self.niri.display_handle, &desc); | ||
| } | ||
| if device.has_capability(DeviceCapability::Touch) && self.niri.seat.get_touch().is_none() { | ||
| self.niri.seat.add_touch(); |
There was a problem hiding this comment.
Do we need to remove it in on_device_removed()?
There was a problem hiding this comment.
We can, yeah. Added some tracking for touch devices and to remove touch support when the last touch device has been removed.
| let under = self | ||
| .niri | ||
| .surface_under_and_global_space(touch_location) | ||
| .map(|under| under.surface); |
There was a problem hiding this comment.
We probably want to activate window / output under touch here, just like we do for mouse and tablet clicks?
There was a problem hiding this comment.
I initially intended on adding that through bindings on global gestures. But I guess for now we can just activate the window similar to pointer button. One important difference is that I added a check if there is a touch grab and in this case not activate a window. I added that to prevent stealing the window on multiple touches.
00932a7 to
0a250ac
Compare
YaLTeR
left a comment
There was a problem hiding this comment.
Don't have a touch device to test, but code wise looks good.
|
Thanks! |
decided to give it a try despite being unfinished in smithay.lacks testing, proper output selection, doesn't work properly with output transform,...
but hey, touch seems to work so far on my laptop :)
based on Smithay/smithay#1326mergedSo, with the touch refactor merged in smithay it is time to finally finish basic touch support in niri