Skip to content

Commit

Permalink
WindowServer: Don't send menu item activations for separators
Browse files Browse the repository at this point in the history
Separators can't have identifiers associated with them, so it's not
possible to react meaningfully to their activation. Don't send messages
about it to avoid confusing the clients.
  • Loading branch information
awesomekling committed Nov 11, 2019
1 parent 5e61fd0 commit 2fcf156
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Servers/WindowServer/WSMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ void WSMenu::clear_hovered_item()

void WSMenu::did_activate(WSMenuItem& item)
{
if (item.type() == WSMenuItem::Type::Separator)
return;

if (on_item_activation)
on_item_activation(item);

Expand Down

0 comments on commit 2fcf156

Please sign in to comment.