WindowServer: Add support for default MenuItem

This allows marking a MenuItem as a default action, e.g. in a
context menu for an action that reflects what e.g. a double click
would perform.

Also enhance the window menu to mark the close action as the
default, and when double clicked perform that action.

Fixes #1289
This commit is contained in:
Tom 2020-07-07 12:09:18 -06:00 committed by Andreas Kling
commit fc4e01a3c9
Notes: sideshowbarker 2024-07-19 04:58:08 +09:00
10 changed files with 194 additions and 32 deletions

View file

@ -87,6 +87,8 @@ public:
bool is_window_menu_open() { return m_is_window_menu_open; }
void set_window_menu_open(bool is_open) { m_is_window_menu_open = is_open; }
bool activate_default();
int content_width() const;
int item_height() const { return 20; }