From: Marcus Fritzsch Date: Mon, 4 Sep 2017 14:05:06 +0000 (+0200) Subject: Call event handler only if event-label matches X-Git-Tag: 4.99.1~37 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2Fwindowmanager.git;a=commitdiff_plain;h=0ffdfa88ee21c533e2b3f3627c088ca12fc661d2 Call event handler only if event-label matches Signed-off-by: Marcus Fritzsch --- diff --git a/AFBClient.cpp b/AFBClient.cpp index 99f22bd..cee49ad 100644 --- a/AFBClient.cpp +++ b/AFBClient.cpp @@ -403,7 +403,9 @@ void AFBClient::Impl::event(char const *et, char const *label) { auto i = this->handlers.find(oet.second); if (i != this->handlers.end()) { - i->second(label); + if (this->labels.find(label) != this->labels.end()) { + i->second(label); + } } }