From 2fcf156540bde9d68587362e86207f6f806ed937 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 11 Nov 2019 12:56:13 +0100 Subject: [PATCH] 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. --- Servers/WindowServer/WSMenu.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);