From 6c85d7cb4c7cde62d90e46be543849dc449e747c Mon Sep 17 00:00:00 2001 From: Emre Yolcu Date: Wed, 5 Jun 2024 16:18:57 -0400 Subject: [PATCH] Release event tap and run loop source after adding source --- DiscreteScroll.xcodeproj/project.pbxproj | 8 ++++---- DiscreteScroll/main.c | 2 ++ README.md | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/DiscreteScroll.xcodeproj/project.pbxproj b/DiscreteScroll.xcodeproj/project.pbxproj index 27bfe48..70f3a6f 100644 --- a/DiscreteScroll.xcodeproj/project.pbxproj +++ b/DiscreteScroll.xcodeproj/project.pbxproj @@ -249,14 +249,14 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; INFOPLIST_FILE = DiscreteScroll/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 1.2.0; + MARKETING_VERSION = 1.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.emreyolcu.DiscreteScroll; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -267,14 +267,14 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; INFOPLIST_FILE = DiscreteScroll/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 1.2.0; + MARKETING_VERSION = 1.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.emreyolcu.DiscreteScroll; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/DiscreteScroll/main.c b/DiscreteScroll/main.c index aaa9239..52fbc36 100644 --- a/DiscreteScroll/main.c +++ b/DiscreteScroll/main.c @@ -91,6 +91,8 @@ int main(void) if (!source) displayNoticeAndExit(CFSTR("DiscreteScroll could not create a run loop source.")); CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode); + CFRelease(tap); + CFRelease(source); CFRunLoopRun(); return EXIT_SUCCESS; diff --git a/README.md b/README.md index 42b83c9..3d142ce 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ As of May 2024, this application works on macOS versions 10.9–14.0. ### Installation -You may download the binary [here](https://github.com/emreyolcu/discrete-scroll/releases/download/v1.1.0/DiscreteScroll.zip). +You may download the binary [here](https://github.com/emreyolcu/discrete-scroll/releases/download/v1.2.1/DiscreteScroll.zip). DiscreteScroll requires access to accessibility features. Upon startup, if it does not have access, it will prompt you and wait. You do not need to restart the application @@ -88,6 +88,10 @@ even though you have previously granted it access, try the following: ### History +#### v1.2.1 (2024-06-05) + +- **Fix:** Release event tap and run loop source after adding source. + #### v1.2.0 (2024-06-02) - Remove accessibility observer once granted access.