mirror of
https://github.com/RGBCube/serenity
synced 2025-07-19 07:57:34 +00:00
WindowServer: Don't send menu item activations for separators
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.
This commit is contained in:
parent
5e61fd0e67
commit
2fcf156540
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue