diff options
-rw-r--r-- | Userland/Services/WindowServer/Menu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Services/WindowServer/Menu.cpp b/Userland/Services/WindowServer/Menu.cpp index fe5d3d794d..8f9dbc7ff6 100644 --- a/Userland/Services/WindowServer/Menu.cpp +++ b/Userland/Services/WindowServer/Menu.cpp @@ -556,8 +556,11 @@ int Menu::item_index_at(const Gfx::IntPoint& position) { int i = 0; for (auto& item : m_items) { - if (item.rect().contains(position)) + if (item.rect().contains(position)) { + if (item.type() == MenuItem::Type::Separator) + return -1; return i; + } ++i; } return -1; |