From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Anshul Garg <aksgarg1989@gmail.com>
Cc: linux-input@vger.kernel.org,
"anshul.g@samsung.com" <anshul.g@samsung.com>
Subject: Re: [Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem
Date: Wed, 24 Dec 2014 10:25:11 -0800 [thread overview]
Message-ID: <20141224182511.GA21956@dtor-glaptop> (raw)
In-Reply-To: <CA+HOOsgDm-ZGycDwdzw3SvbscUefp7xcD-ikFSF2heouHMhS4g@mail.gmail.com>
Hi Anshul,
On Tue, Dec 23, 2014 at 08:04:45PM +0530, Anshul Garg wrote:
> Dear Mr Dmitry ,
>
> Thanks for the reply.
>
> I understand that if some handler grabs the input device then all
> events will sent to that handler only.
>
> My Concern is If No handler has grabbed the input device then all events
> should go to all handlers after application of all filter handlers on
> input event
> list ( As we have to check for each event whether that event can be filtered
> or not).
>
> For example : If 5 handlers registered for the input device and input device is
> not grabbed.
> Now among these 5 handlers 2 are filter handlers and remaining 3 are regular
> input handlers.
> So we have to filter the event list first after applying 2 filters
> then send the remaining
> events to all registered handler.
>
> In this case as per current implementation we pass the events array to
> each handler. Input Core does events filtering fr handler then send remaining
> events to handler.
>
> What i am proposing is first we have to pass input_value list to all
> filter handlers
> After filteration of events, we can send the remaining events (Some
> events might be removed after applying filter) to all handlers.
As far as I can see that is exactly what happens: we first pass the even list
to filters, which may cause the list to contract - see input_to_handler() - and
then to regular handlers.
I think the tricky part is the fact that we deliberately put filters in the
head of the dev->h_list, and normal handlers are put in the tail. And we also
expect the input_handler to either implement ->filter() or ->event[s]()
callback, but not both.
In case I still misunderstand what the issue you are trying to point out -
please do post your patch and we can discuss the code.
Thanks!
--
Dmitry
next prev parent reply other threads:[~2014-12-24 18:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 17:06 [Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem Anshul Garg
2014-12-22 17:26 ` Dmitry Torokhov
2014-12-23 1:22 ` Anshul Garg
2014-12-23 14:34 ` Anshul Garg
2014-12-24 18:25 ` Dmitry Torokhov [this message]
2014-12-25 5:41 ` Anshul Garg
2014-12-26 23:46 ` Dmitry Torokhov
2014-12-29 15:04 ` Anshul Garg
-- strict thread matches above, loose matches on Subject: below --
2014-12-22 13:13 Anshul Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141224182511.GA21956@dtor-glaptop \
--to=dmitry.torokhov@gmail.com \
--cc=aksgarg1989@gmail.com \
--cc=anshul.g@samsung.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).