fyhuang/enjoy2 — pull request #16 by harryhope (2014-11-24 00:48:05+00:00)
Title: #7 Fix an issue where mouse movement stops being detected.

This commit addresses https://github.com/fyhuang/enjoy2/issues/7

On OSX 10.9 and 10.10 app nap causes enjoy to stop recognizing mouse movement input after a brief period of time. This uses beginActivityWithOptions to prevent the app from idling and being unable to control the cursor.

Reference: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSProcessInfo_Class/index.html#//apple_ref/occ/instm/NSProcessInfo/beginActivityWithOptions:reason: