wm: transpose touch events to window positions

This patch enhances the window manager with the ability to transform
touch events analogously to absolute motion events.

Issue #4514
This commit is contained in:
Norman Feske 2022-05-20 14:09:27 +02:00 committed by Christian Helmuth
parent e3f00ce5fc
commit 63b0f1a2f7

View File

@ -552,6 +552,11 @@ class Wm::Gui::Session_component : public Rpc_object<Gui::Session>,
ev = Input::Absolute_motion{p.x(), p.y()};
});
ev.handle_touch([&] (Input::Touch_id id, float x, float y) {
ev = Input::Touch { .id = id,
.x = x + (float)origin.x(),
.y = y + (float)origin.y() }; });
return ev;
}