diff --git a/Libraries/LibCore/EventReceiver.cpp b/Libraries/LibCore/EventReceiver.cpp index 157b5b60b80..64585dec6f6 100644 --- a/Libraries/LibCore/EventReceiver.cpp +++ b/Libraries/LibCore/EventReceiver.cpp @@ -11,7 +11,6 @@ #include #include #include -#include namespace Core { @@ -156,9 +155,6 @@ void EventReceiver::dispatch_event(Core::Event& e, EventReceiver* stay_within) VERIFY(!stay_within || stay_within == this || stay_within->is_ancestor_of(*this)); auto* target = this; do { - // If there's an event filter on this target, ask if it wants to swallow this event. - if (target->m_event_filter && !target->m_event_filter(e)) - return; target->event(e); target = target->parent(); if (target == stay_within) { @@ -175,9 +171,4 @@ bool EventReceiver::is_visible_for_timer_purposes() const return true; } -void EventReceiver::set_event_filter(Function filter) -{ - m_event_filter = move(filter); -} - } diff --git a/Libraries/LibCore/EventReceiver.h b/Libraries/LibCore/EventReceiver.h index b167bd1c457..fff6b0a9a6b 100644 --- a/Libraries/LibCore/EventReceiver.h +++ b/Libraries/LibCore/EventReceiver.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -125,8 +124,6 @@ public: void remove_child(EventReceiver&); void remove_all_children(); - void set_event_filter(Function); - void deferred_invoke(Function); void dispatch_event(Core::Event&, EventReceiver* stay_within = nullptr); @@ -174,7 +171,6 @@ private: ByteString m_name; intptr_t m_timer_id { 0 }; Vector> m_children; - Function m_event_filter; }; }