svn commit: r325299 - head/sys/dev/evdev

Vladimir Kondratyev wulf at FreeBSD.org
Wed Nov 1 22:37:45 UTC 2017


Author: wulf
Date: Wed Nov  1 22:37:43 2017
New Revision: 325299
URL: https://svnweb.freebsd.org/changeset/base/325299

Log:
  evdev: Do not start/stop softrepeat callout if no clients attached
  
  Reviewed by:		gonzo
  Approved by:		gonzo (mentor)
  MFC after:		2 weeks
  Differential Revision:	https://reviews.freebsd.org/D12676

Modified:
  head/sys/dev/evdev/evdev.c

Modified: head/sys/dev/evdev/evdev.c
==============================================================================
--- head/sys/dev/evdev/evdev.c	Wed Nov  1 22:33:44 2017	(r325298)
+++ head/sys/dev/evdev/evdev.c	Wed Nov  1 22:37:43 2017	(r325299)
@@ -579,7 +579,8 @@ evdev_modify_event(struct evdev_dev *evdev, uint16_t t
 				*value = KEY_EVENT_REPEAT;
 		} else {
 			/* Start/stop callout for evdev repeats */
-			if (bit_test(evdev->ev_key_states, code) == !*value) {
+			if (bit_test(evdev->ev_key_states, code) == !*value &&
+			    !LIST_EMPTY(&evdev->ev_clients)) {
 				if (*value == KEY_EVENT_DOWN)
 					evdev_start_repeat(evdev, code);
 				else


More information about the svn-src-head mailing list