linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: move check for same handler in input_pass_event
@ 2011-01-06 22:24 Kristen Carlson Accardi
  2011-01-06 22:29 ` Kristen Carlson Accardi
  2011-01-07  6:04 ` Dmitry Torokhov
  0 siblings, 2 replies; 9+ messages in thread
From: Kristen Carlson Accardi @ 2011-01-06 22:24 UTC (permalink / raw)
  To: linux-input; +Cc: Kristen Carlson Accardi

If the handler that injected an event is the same,
just skip the filter, but allow the handler->event()
routine to be called.  This allows evdev to be able to
be used to loopback events.
---
 drivers/input/input.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index db409d6..cdeb929 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -98,16 +98,15 @@ static void input_pass_event(struct input_dev *dev,
 			 * particular event we want to skip it to avoid
 			 * filters firing again and again.
 			 */
-			if (handler == src_handler)
-				continue;
-
 			if (!handler->filter) {
 				if (filtered)
 					break;
 
 				handler->event(handle, type, code, value);
 
-			} else if (handler->filter(handle, type, code, value))
+			} else if (handler != src_handler &&
+					handler->filter(handle, type, code,
+								value))
 				filtered = true;
 		}
 	}
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-01-26  4:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 22:24 [PATCH] input: move check for same handler in input_pass_event Kristen Carlson Accardi
2011-01-06 22:29 ` Kristen Carlson Accardi
2011-01-07  6:04 ` Dmitry Torokhov
2011-01-07 18:24   ` Kristen Carlson Accardi
2011-01-07 19:29     ` Dmitry Torokhov
2011-01-07 19:32       ` Arjan van de Ven
2011-01-07 19:43         ` Dmitry Torokhov
2011-01-20  8:56           ` Dmitry Torokhov
2011-01-26  4:59             ` Dmitry Torokhov

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).