mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:37:46 +00:00
WindowServer: Simplify the way we update items in the window menu
Instead of trying to update only the little bit that changes, let's have a function that updates all the window menu items in one go. It's just a couple of string and boolean assignment, and the real cost is performing the subsequent menu redraw, which remains the same.
This commit is contained in:
parent
62b76a7c95
commit
5aa9f128fc
2 changed files with 17 additions and 28 deletions
|
@ -46,11 +46,6 @@ enum class WindowTileType {
|
|||
BottomRight
|
||||
};
|
||||
|
||||
enum class PopupMenuItem {
|
||||
Minimize = 0,
|
||||
Maximize,
|
||||
};
|
||||
|
||||
enum class WindowMenuAction {
|
||||
MinimizeOrUnminimize = 0,
|
||||
MaximizeOrRestore,
|
||||
|
@ -327,11 +322,10 @@ private:
|
|||
virtual void event(Core::Event&) override;
|
||||
void handle_mouse_event(const MouseEvent&);
|
||||
void handle_keydown_event(const KeyEvent&);
|
||||
void update_menu_item_text(PopupMenuItem item);
|
||||
void update_menu_item_enabled(PopupMenuItem item);
|
||||
void add_child_window(Window&);
|
||||
void add_accessory_window(Window&);
|
||||
void ensure_window_menu();
|
||||
void update_window_menu_items();
|
||||
void modal_unparented();
|
||||
|
||||
ClientConnection* m_client { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue