From 6dddafbcf505939751ddb2d66ffb586d150aaaa8 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Thu, 14 Mar 2013 21:10:22 +0100 Subject: [PATCH] Don't let the app control itself, it only leads to accidents or mouse bugs. Don't auto-focus the key field when simulating either. --- Classes/NJDeviceController.m | 6 ++++-- Info.plist | 2 +- .../Contents/Resources/English.lproj/pgs/mouse.html | 10 ---------- .../Contents/Resources/English.lproj/pgs/whatsnew.html | 5 +++++ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Classes/NJDeviceController.m b/Classes/NJDeviceController.m index 39ec389..0b0fe92 100644 --- a/Classes/NJDeviceController.m +++ b/Classes/NJDeviceController.m @@ -138,13 +138,15 @@ [self expandRecursive:handler]; [outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[outlineView rowForItem:handler]] byExtendingSelection: NO]; - [outputController focusKey]; + if (!self.simulatingEvents) + [outputController focusKey]; } - (void)hidManager:(NJHIDManager *)manager valueChanged:(IOHIDValueRef)value fromDevice:(IOHIDDeviceRef)device { - if (self.simulatingEvents) { + if (self.simulatingEvents + && !NSApplication.sharedApplication.isActive) { [self runOutputForDevice:device value:value]; } else { [self showOutputForDevice:device value:value]; diff --git a/Info.plist b/Info.plist index 0ea7a95..ed9e83f 100644 --- a/Info.plist +++ b/Info.plist @@ -46,7 +46,7 @@ CFBundleSignature ???? CFBundleVersion - 298 + 301 LSApplicationCategoryType public.app-category.utilities NSHumanReadableCopyright diff --git a/Resources/Help/Contents/Resources/English.lproj/pgs/mouse.html b/Resources/Help/Contents/Resources/English.lproj/pgs/mouse.html index 5436540..f52c5b6 100644 --- a/Resources/Help/Contents/Resources/English.lproj/pgs/mouse.html +++ b/Resources/Help/Contents/Resources/English.lproj/pgs/mouse.html @@ -76,15 +76,5 @@ change this globally in  > System Preferences… > Mouse and  > System Preferences… > Trackpad.

- -

Known Issues

-

- Enjoyable is unable to send most mouse events to itself - the - application will freeze until you click on it with a real mouse - or touchpad. If you find another appliation that has problems - with Enjoyable's mouse support please - file a ticket in the issue tracker. -

diff --git a/Resources/Help/Contents/Resources/English.lproj/pgs/whatsnew.html b/Resources/Help/Contents/Resources/English.lproj/pgs/whatsnew.html index 961e84c..3506443 100644 --- a/Resources/Help/Contents/Resources/English.lproj/pgs/whatsnew.html +++ b/Resources/Help/Contents/Resources/English.lproj/pgs/whatsnew.html @@ -59,6 +59,11 @@ Enjoyable uses fewer resources when running in the background. +
  • + To prevent accidentally rebinding keys right after + enabling simulation, Enjoyable can no longer control + itself. +
  • -- 2.30.2