1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

WindowServer: Don't call Core::Object::event() directly

To make sure event filters are respected, we should not be calling
event() directly, but rather dispatch_event().
This commit is contained in:
Andreas Kling 2021-03-28 11:18:05 +02:00
parent 54c7110d9d
commit 6f45c27d06

View file

@ -1096,7 +1096,7 @@ void WindowManager::reevaluate_hovered_window(Window* updated_window)
// e.g. a hit-test result change due to a transparent window repaint.
if (hovered_window->hit_test(cursor_location, false)) {
MouseEvent event(Event::MouseMove, cursor_location.translated(-hovered_window->rect().location()), 0, MouseButton::None, 0);
hovered_window->event(event);
hovered_window->dispatch_event(event);
} else if (!hovered_window->is_frameless()) {
MouseEvent event(Event::MouseMove, cursor_location.translated(-hovered_window->frame().rect().location()), 0, MouseButton::None, 0);
hovered_window->frame().on_mouse_event(event);