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

WindowServer+LibGUI: Notify GUI clients about menu item enter/leave

We now send out MenuItemEntered and MenuItemLeft messages to the client
when the user hovers/unhovers menu items.

On the client side, these become GUI::ActionEvent, with one of two
types: ActionEnter or ActionLeave. They are sent to the Application.

This will allow GUI applications to react to these events.
This commit is contained in:
Andreas Kling 2021-04-17 18:16:54 +02:00
parent f8c2beec7c
commit ba7e1ca2fb
7 changed files with 91 additions and 19 deletions

View file

@ -101,11 +101,7 @@ public:
MenuItem* hovered_item() const;
void set_hovered_index(int index, bool make_input = false)
{
m_hovered_item_index = index;
update_for_new_hovered_item(make_input);
}
void set_hovered_index(int index, bool make_input = false);
void clear_hovered_item();