Author: mav Date: Tue Jun 15 19:19:04 2010 New Revision: 209214 URL: http://svn.freebsd.org/changeset/base/209214
Log: 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. Reviewed by: philip@ Modified: head/usr.sbin/moused/moused.c Modified: head/usr.sbin/moused/moused.c ============================================================================== --- head/usr.sbin/moused/moused.c Tue Jun 15 19:14:39 2010 (r209213) +++ head/usr.sbin/moused/moused.c Tue Jun 15 19:19:04 2010 (r209214) @@ -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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"