1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:35:06 +00:00

Start bringing up LibGUI properly (formerly Widgets.)

This commit is contained in:
Andreas Kling 2019-01-20 05:48:43 +01:00
parent b91479d9b9
commit 8eae89a405
17 changed files with 258 additions and 33 deletions

View file

@ -285,9 +285,10 @@ void WSWindowManager::process_mouse_event(MouseEvent& event)
move_to_front(*window);
set_active_window(window);
}
// 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);
// FIXME: Should we just alter the coordinates of the existing MouseEvent and pass it through?
Point position { event.x() - window->rect().x(), event.y() - window->rect().y() };
auto local_event = make<MouseEvent>(event.type(), position, event.buttons(), event.button());
window->event(*local_event);
return;
}
}