v2 - Complete Swift rewrite and modernization of the codebase - #102
Open
santoru wants to merge 25 commits into
Open
v2 - Complete Swift rewrite and modernization of the codebase#102santoru wants to merge 25 commits into
santoru wants to merge 25 commits into
Conversation
…buttons into JasonMFry-patch-1
…vements - Add NULL checks in gesture synthesis to prevent crashes on incompatible macOS - Cache NSUserDefaults in static vars (read on toggle, not every event) - Graceful fallback: pass events through if synthesis fails instead of swallowing - Auto re-enable event tap on OS timeout - Enable hardened runtime with entitlements - Fix memory leak in SwipeSimulator (remove extra CFRetain) - Make swipeInfo immutable after initialization - Set ARCHS=$(ARCHS_STANDARD) for universal binary (arm64+x86_64) - Add periodic TCC permission check; disable tap gracefully if revoked
New Swift target in SideButtonFixer/Swift/: - archagon#3: Flash menu bar icon on gesture synthesis failure, pass event through - archagon#4: Full Swift + SwiftUI port (declarative menu, no manual frame math) - archagon#5: Menu items accessed by title, not fragile index - archagon#8: macOS version check at launch, warns on untested releases - archagon#9: Global hotkey ⌘⇧B to toggle menu bar icon visibility - archagon#10: No manual layout — SwiftUI handles everything - archagon#11: Accessibility labels on all menu items - archagon#13: Donation nag removed entirely Also: CF_RETURNS_RETAINED annotation on tl_CGEventCreateFromGesture for proper Swift memory management, updated README with shortcuts table.
New target 'SensibleSideButtonsSwift' in the existing project: - Sources: Swift/*.swift + External/TouchEvents.c - Bridging header configured - Hardened runtime, universal binary (arm64+x86_64) - Deployment target: macOS 10.13 - build.sh defaults to Swift target now
- Create SideButtonFixer/Swift/Info.plist without NSMainStoryboardFile or NSPrincipalClass (conflicts with @main Swift entry point) - Add HEADER_SEARCH_PATHS = External so bridging header finds TouchEvents.h - Add GENERATE_INFOPLIST_FILE = NO to prevent Xcode from overriding
- Populate .gitignore (build/, DerivedData/, xcuserdata/, .DS_Store) - Bump TCC permission check interval to 30s (saves battery) - Fix kAXTrustedCheckOptionPrompt memory leak (takeUnretainedValue) - Make SwipeDirection a proper RawRepresentable enum - Replace Carbon RegisterEventHotKey with NSEvent monitors - Use menu item tags instead of fragile title-string lookups - Add event tap re-enable backoff (prevents tight loop) - Add NSSupportsAutomaticTermination/NSSupportsSuddenTermination - Update copyright to 2018-2026, credit @santoru
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
2.0.0
Complete Swift rewrite and modernization of the codebase.
Added
@mainentry point)NSSupportsAutomaticTermination/NSSupportsSuddenTerminationlifecycle declarationsChanged
RegisterEventHotKeywith modernNSEventmonitorsSwipeDirectionis now a properRawRepresentableenumcom.santoru.sensible-side-buttonsFixed
kAXTrustedCheckOptionPromptmemory leak (takeUnretainedValueinstead oftakeRetainedValue)Removed
1.x
Original Objective-C implementation by Archagon.