From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 12:06:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E1A106564A; Sun, 11 Jul 2010 12:06:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58CBD8FC1A; Sun, 11 Jul 2010 12:06:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BC6hZc071782; Sun, 11 Jul 2010 12:06:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BC6h7i071780; Sun, 11 Jul 2010 12:06:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111206.o6BC6h7i071780@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 12:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209898 - stable/8/usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 12:06:43 -0000 Author: mav Date: Sun Jul 11 12:06:42 2010 New Revision: 209898 URL: http://svn.freebsd.org/changeset/base/209898 Log: MFC r209214: When Emulate3Button is active, do not set select() timeout in states when it is not needed. No need to kick CPU every 20ms without a purpose. Modified: stable/8/usr.sbin/moused/moused.c Directory Properties: stable/8/usr.sbin/moused/ (props changed) Modified: stable/8/usr.sbin/moused/moused.c ============================================================================== --- stable/8/usr.sbin/moused/moused.c Sun Jul 11 11:58:46 2010 (r209897) +++ stable/8/usr.sbin/moused/moused.c Sun Jul 11 12:06:42 2010 (r209898) @@ -1090,7 +1090,8 @@ moused(void) FD_SET(rodent.mremcfd, &fds); c = select(FD_SETSIZE, &fds, NULL, NULL, - (rodent.flags & Emulate3Button) ? &timeout : NULL); + ((rodent.flags & Emulate3Button) && + S_DELAYED(mouse_button_state)) ? &timeout : NULL); if (c < 0) { /* error */ logwarn("failed to read from mouse"); continue;