Author: anevilyak Date: 2011-06-04 00:12:06 +0200 (Sat, 04 Jun 2011) New Revision: 41894 Changeset: https://dev.haiku-os.org/changeset/41894 Modified: haiku/trunk/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp Log: The ioctl for reading mouse parameters was missing the structure size. This would cause it to randomly fail and exit the loop, resulting in the mouse going unresponsive. Modified: haiku/trunk/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp =================================================================== --- haiku/trunk/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp 2011-06-03 21:15:45 UTC (rev 41893) +++ haiku/trunk/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp 2011-06-03 22:12:06 UTC (rev 41894) @@ -393,7 +393,8 @@ nextTransferTime += kTransferDelay; #endif - if (ioctl(fDevice, MS_READ, &movements) != B_OK) { + if (ioctl(fDevice, MS_READ, &movements, sizeof(movements)) != B_OK) { + LOG_ERR("Mouse device exiting, %s\n", strerror(errno)); _ControlThreadCleanup(); // TOAST! return;