diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-28 11:25:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-28 11:25:57 +0200 |
commit | 71a9a14c17ebbf5e4e72d89e2ca52a6e6b5e0044 (patch) | |
tree | 291307fee16c2029d1ee064a6757ace20d458735 /Userland/Services | |
parent | 247717431d4f92ef15284a15c5e814d538d1a452 (diff) | |
download | serenity-71a9a14c17ebbf5e4e72d89e2ca52a6e6b5e0044.zip |
WindowServer: Make Window::event() protected
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/WindowServer/AppletManager.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/Window.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Services/WindowServer/AppletManager.cpp b/Userland/Services/WindowServer/AppletManager.cpp index 4b7c6d5962..5447715828 100644 --- a/Userland/Services/WindowServer/AppletManager.cpp +++ b/Userland/Services/WindowServer/AppletManager.cpp @@ -63,7 +63,7 @@ void AppletManager::event(Core::Event& event) if (!applet->rect_in_menubar().contains(mouse_event.position())) continue; auto local_event = mouse_event.translated(-applet->rect_in_menubar().location()); - applet->event(local_event); + applet->dispatch_event(local_event); } } diff --git a/Userland/Services/WindowServer/Window.h b/Userland/Services/WindowServer/Window.h index f62b07f871..00f914ffce 100644 --- a/Userland/Services/WindowServer/Window.h +++ b/Userland/Services/WindowServer/Window.h @@ -202,8 +202,6 @@ public: void clear_dirty_rects(); Gfx::DisjointRectSet& dirty_rects() { return m_dirty_rects; } - virtual void event(Core::Event&) override; - // Only used by WindowType::MenuApplet. Perhaps it could be a Window subclass? I don't know. void set_rect_in_menubar(const Gfx::IntRect& rect) { m_rect_in_menubar = rect; } const Gfx::IntRect& rect_in_menubar() const { return m_rect_in_menubar; } @@ -333,6 +331,7 @@ public: void set_menubar(MenuBar*); private: + virtual void event(Core::Event&) override; void handle_mouse_event(const MouseEvent&); void update_menu_item_text(PopupMenuItem item); void update_menu_item_enabled(PopupMenuItem item); |