Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2017 22:37:44 +0000 (UTC)
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325299 - head/sys/dev/evdev
Message-ID:  <201711012237.vA1MbiPL057357@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711012237.vA1MbiPL057357>