feat(wayland): touch, with the first finger standing in for the pointer
The seat's wl_touch was never bound, so a touchscreen could not drive a window at all. Every finger is now reported through onTouchDown, onTouchMove, onTouchUp and onTouchCancel (TouchPoint: the compositor's id and the position in physical pixels). The first finger down also enters the window — Device::focusedWindow and the pointer serial the clipboard needs — presses the left button, moves it and releases it when it lifts, so an application written for a pointer works on a phone as it is.
This commit is contained in:
parent
b16f1e99d5
commit
aed6142cce
5 changed files with 104 additions and 0 deletions
|
|
@ -557,6 +557,10 @@ Window::~Window() {
|
|||
std::erase(Device::windows, this);
|
||||
if (Device::focusedWindow == this) Device::focusedWindow = nullptr;
|
||||
if (Device::keyboardWindow == this) Device::keyboardWindow = nullptr;
|
||||
if (Device::touchWindow == this) {
|
||||
Device::touchWindow = nullptr;
|
||||
Device::touchPositions.clear();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue