WindowServer: Redraw menu items after client updates them somehow
This fixes an issue where the undo/redo actions in TextEditor only updated once you hovered over them.
This commit is contained in:
parent
42435ce5e4
commit
17687435ca
Notes:
sideshowbarker
2024-07-17 08:05:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/17687435ca
2 changed files with 4 additions and 0 deletions
|
@ -191,6 +191,8 @@ void ConnectionFromClient::update_menu_item(i32 menu_id, i32 identifier, [[maybe
|
|||
menu_item->set_default(is_default);
|
||||
if (checkable)
|
||||
menu_item->set_checked(checked);
|
||||
|
||||
menu.redraw(*menu_item);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::remove_menu_item(i32 menu_id, i32 identifier)
|
||||
|
|
|
@ -106,6 +106,8 @@ void Menu::redraw()
|
|||
|
||||
void Menu::redraw(MenuItem const& menu_item)
|
||||
{
|
||||
if (!menu_window())
|
||||
return;
|
||||
draw(menu_item);
|
||||
menu_window()->invalidate(menu_item.rect());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue