Deliver mouse events to the appropriate Window.

This commit is contained in:
Andreas Kling 2018-10-12 01:26:20 +02:00
commit 5d125e40d9
Notes: sideshowbarker 2024-07-19 18:50:29 +09:00
3 changed files with 16 additions and 1 deletions

View file

@ -116,6 +116,7 @@ void WindowManager::processMouseEvent(MouseEvent& event)
if (window->rect().contains(event.position())) {
// FIXME: Re-use the existing event instead of crafting a new one?
auto localEvent = make<MouseEvent>(event.type(), event.x() - window->rect().x(), event.y() - window->rect().y(), event.button());
window->event(*localEvent);
return;
}
}