From 4392413cd1520b11a5c9314dd2a291e8ca92a75d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 23 Jul 2020 19:52:18 +0200 Subject: [PATCH] LibGUI: Make window-parented actions actually scoped to the window We were relying on Core::is() to tell us whether the parent of an action is a window. This didn't work since we only saw a forward declaration of GUI::Window in Action.cpp. This is an unfortunate flaw in the is pattern and we should solve it somehow but not in this patch. --- Libraries/LibGUI/Action.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/LibGUI/Action.cpp b/Libraries/LibGUI/Action.cpp index 701e3c9c33..8bb9ef7c88 100644 --- a/Libraries/LibGUI/Action.cpp +++ b/Libraries/LibGUI/Action.cpp @@ -29,6 +29,7 @@ #include #include #include +#include namespace GUI { @@ -157,8 +158,9 @@ Action::Action(const StringView& text, const Shortcut& shortcut, RefPtrregister_global_shortcut_action({}, *this); + } } }