mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
WindowServer: Add Menu::is_open() to improve readability
"menu.is_open()" instead of "MenuManager::the().is_open(menu)"
This commit is contained in:
parent
dfb2178519
commit
5d0c3bd564
4 changed files with 11 additions and 3 deletions
|
@ -291,7 +291,7 @@ void MenuManager::set_hovered_menu(Menu* menu)
|
|||
|
||||
void MenuManager::open_menu(Menu& menu, bool as_current_menu)
|
||||
{
|
||||
if (is_open(menu)) {
|
||||
if (menu.is_open()) {
|
||||
if (as_current_menu || current_menu() != &menu) {
|
||||
// This menu is already open. If requested, or if the current
|
||||
// window doesn't match this one, then set it to this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue