Skip to content

Skip vibration when lid is closed - #6

Merged
devxoul merged 1 commit into
mainfrom
skip-when-lid-closed
Oct 20, 2026
Merged

devxoul merged 1 commit into
mainfrom
skip-when-lid-closed

Conversation

@devxoul

@devxoul devxoul commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

Skip haptic playback while the MacBook lid is closed (clamshell mode). The trackpad can't be felt then, so vibrating it is pointless.

Changes

  • native: add isLidClosed(), which reads AppleClamshellState from IOPMrootDomain
  • HapticEngine.playBeat: return early when isLidClosed() is true
  • Tests for both the closed and the open lid state

@typeey typeey Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes line by line at 5013ea5; no actionable correctness or regression issues found. Closed/open-lid tests and passing macOS CI support the change. Physical lid/haptic behavior remains unverified on hardware.

@devxoul
devxoul merged commit 9554666 into main Oct 20, 2026
3 checks passed
@devxoul
devxoul deleted the skip-when-lid-closed branch October 20, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant