diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-11 12:56:13 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-11 13:13:08 +0100 |
commit | 2fcf156540bde9d68587362e86207f6f806ed937 (patch) | |
tree | 8f5e370b7f1b5623442cfb6a045279c4d5132c1d /Servers | |
parent | 5e61fd0e67f0ae3e77435d1aea2bcba1b37cf320 (diff) | |
download | serenity-2fcf156540bde9d68587362e86207f6f806ed937.zip |
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.
Diffstat (limited to 'Servers')
-rw-r--r-- | Servers/WindowServer/WSMenu.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSMenu.cpp b/Servers/WindowServer/WSMenu.cpp index 6cb797e459..1cacfa534e 100644 --- a/Servers/WindowServer/WSMenu.cpp +++ b/Servers/WindowServer/WSMenu.cpp @@ -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); |