mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:37:45 +00:00
WindowServer: Make Window::event() protected
This commit is contained in:
parent
247717431d
commit
71a9a14c17
2 changed files with 2 additions and 3 deletions
|
@ -63,7 +63,7 @@ void AppletManager::event(Core::Event& event)
|
||||||
if (!applet->rect_in_menubar().contains(mouse_event.position()))
|
if (!applet->rect_in_menubar().contains(mouse_event.position()))
|
||||||
continue;
|
continue;
|
||||||
auto local_event = mouse_event.translated(-applet->rect_in_menubar().location());
|
auto local_event = mouse_event.translated(-applet->rect_in_menubar().location());
|
||||||
applet->event(local_event);
|
applet->dispatch_event(local_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,8 +202,6 @@ public:
|
||||||
void clear_dirty_rects();
|
void clear_dirty_rects();
|
||||||
Gfx::DisjointRectSet& dirty_rects() { return m_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.
|
// 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; }
|
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; }
|
const Gfx::IntRect& rect_in_menubar() const { return m_rect_in_menubar; }
|
||||||
|
@ -333,6 +331,7 @@ public:
|
||||||
void set_menubar(MenuBar*);
|
void set_menubar(MenuBar*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual void event(Core::Event&) override;
|
||||||
void handle_mouse_event(const MouseEvent&);
|
void handle_mouse_event(const MouseEvent&);
|
||||||
void update_menu_item_text(PopupMenuItem item);
|
void update_menu_item_text(PopupMenuItem item);
|
||||||
void update_menu_item_enabled(PopupMenuItem item);
|
void update_menu_item_enabled(PopupMenuItem item);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue