Skip to content

Commit

Permalink
Small adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
thealpa committed Feb 8, 2023
1 parent f583073 commit e6b0e37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions SaneSideButtons.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 18;
CURRENT_PROJECT_VERSION = 20;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = B7HSFEB698;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -365,7 +365,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 18;
CURRENT_PROJECT_VERSION = 20;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = B7HSFEB698;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
10 changes: 6 additions & 4 deletions SaneSideButtons/SwipeSimulator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ final class SwipeSimulator {
private init() { }

fileprivate func SBFFakeSwipe(direction: TLInfoSwipeDirection) {
let eventBegin: CGEvent = tl_CGEventCreateFromGesture(swipeBegin as CFDictionary,
let eventBegin: CGEvent = tl_CGEventCreateFromGesture(self.swipeBegin as CFDictionary,
[] as CFArray).takeRetainedValue()

var eventSwipe: CGEvent?
if direction == TLInfoSwipeDirection(kTLInfoSwipeLeft) {
eventSwipe = tl_CGEventCreateFromGesture(swipeLeft as CFDictionary, [] as CFArray).takeRetainedValue()
eventSwipe = tl_CGEventCreateFromGesture(self.swipeLeft as CFDictionary,
[] as CFArray).takeRetainedValue()
} else if direction == TLInfoSwipeDirection(kTLInfoSwipeRight) {
eventSwipe = tl_CGEventCreateFromGesture(swipeRight as CFDictionary, [] as CFArray).takeRetainedValue()
eventSwipe = tl_CGEventCreateFromGesture(self.swipeRight as CFDictionary,
[] as CFArray).takeRetainedValue()
}

guard let eventSwipe else { return }
Expand Down Expand Up @@ -72,7 +74,7 @@ final class SwipeSimulator {
}

func setupEventTap() throws {
guard !eventTapIsRunning else { return }
guard !self.eventTapIsRunning else { return }
let eventMask = CGEventMask(1 << CGEventType.otherMouseDown.rawValue | 1 << CGEventType.otherMouseUp.rawValue)
guard let eventTap = CGEvent.tapCreate(tap: .cghidEventTap,
place: .headInsertEventTap,
Expand Down
6 changes: 4 additions & 2 deletions SaneSideButtons/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

*/

// Menu Bar
// MARK: - Menu Bar

"hide" = "Hide Menu Bar Icon";
"hideInfo" = "Relaunch App to Show Again";
"ignore" = "Ignore %@";
"version" = "Version %@";
"about" = "About";
"quit" = "Quit";

// Permission Window
// MARK: - Permissions Window

"authorize_title" = "Authorize SaneSideButtons";
"authorize_subtitle" = "We'll have you up and running in just a minute!";
"authorize_description" = "SaneSideButtons needs your permission to detect mouse events and trigger actions in applications. Follow these steps to authorize it:";
Expand Down

0 comments on commit e6b0e37

Please sign in to comment.