Skip to content

Commit d80b3e1

Browse files
feat: Add system sleep/wake observers and a restart mechanism to rein… (#44)
* feat: Add system sleep/wake observers and a restart mechanism to reinitialize multitouch monitoring. * feat: improve MultitouchManager restart logic to reset gesture state with new tests. * fix: restart() and start() methods * fix: restart() guard condition to allow retry after failed wake The restart() method's guard condition previously checked isMonitoring, which would fail if a previous restart attempt had failed (since internalStop() sets isMonitoring=false before setupEventTap() runs). Changed guard to check wakeObserver OR isMonitoring, allowing restart attempts as long as start() was called and stop() hasn't been called. Also added injectable eventTapSetup factory parameter to init for testing purposes, following the existing TouchDeviceProviding pattern. This allows tests to mock event tap creation which requires accessibility permissions unavailable in test environments. * test: update tests to use injected mock event tap Updated all MultitouchManager test instantiations to inject eventTapSetup: { true } mock, allowing tests to pass without requiring accessibility permissions for CGEvent.tapCreate(). This follows the existing MockDeviceMonitor pattern and fixes 38 failing tests that couldn't run in CI/test environments. * test: add mock event tap to MenuBarControllerTests Updated MenuBarControllerTests to inject eventTapSetup: { true } in setUp() and testControllerWithNilManagerState(), fixing test failures in CI environments without accessibility permissions.
1 parent 2c4bbc7 commit d80b3e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MiddleDrag.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425
"@executable_path/../Frameworks",
426426
);
427427
MACOSX_DEPLOYMENT_TARGET = 15.0;
428-
MARKETING_VERSION = 1.3.5;
428+
MARKETING_VERSION = 1.3.6;
429429
OTHER_LDFLAGS = (
430430
"-framework",
431431
MultitouchSupport,
@@ -468,7 +468,7 @@
468468
"@executable_path/../Frameworks",
469469
);
470470
MACOSX_DEPLOYMENT_TARGET = 15.0;
471-
MARKETING_VERSION = 1.3.5;
471+
MARKETING_VERSION = 1.3.6;
472472
OTHER_LDFLAGS = (
473473
"-framework",
474474
MultitouchSupport,

0 commit comments

Comments
 (0)