1
Fork 0
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:
Andreas Kling 2019-11-11 12:56:13 +01:00
parent 5e61fd0e67
commit 2fcf156540

View file

@ -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);