svn commit: r209898 - stable/8/usr.sbin/moused
Alexander Motin
mav at FreeBSD.org
Sun Jul 11 12:06:43 UTC 2010
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;
More information about the svn-src-stable-8
mailing list