mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
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:
parent
e3f00ce5fc
commit
63b0f1a2f7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user