diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-20 05:48:43 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-20 05:48:43 +0100 |
commit | 8eae89a4054435dc81b534d91ec2a4f12ec7796f (patch) | |
tree | 52a2cfb7f557a4f275e787f82fb0b4ba059338df /WindowServer/WSWindowManager.cpp | |
parent | b91479d9b90e1c6dd33c83d0a2cfc6ba94d1464e (diff) | |
download | serenity-8eae89a4054435dc81b534d91ec2a4f12ec7796f.zip |
Start bringing up LibGUI properly (formerly Widgets.)
Diffstat (limited to 'WindowServer/WSWindowManager.cpp')
-rw-r--r-- | WindowServer/WSWindowManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp index 6ce1c3c209..008f301069 100644 --- a/WindowServer/WSWindowManager.cpp +++ b/WindowServer/WSWindowManager.cpp @@ -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; } } |