From 6e575e8e0a71831eb767dce935f90af44fca605d Mon Sep 17 00:00:00 2001 From: Gennadii Potapov Date: Mon, 13 Apr 2020 15:49:29 +0800 Subject: [PATCH 1/3] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index a8bde6f..937feb7 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,7 @@ If you like Flycut, you can donate [here](https://paypal.me/flycut) Download from the App Store [here](http://itunes.apple.com/us/app/flycut-clipboard-manager/id442160987?mt=12) **DRM-Free:** -Download latest DRM-Free version [here](https://github.com/MarkJerde/Flycut/releases/latest) +Download latest DRM-Free version [here](https://github.com/TermiT/Flycut/releases) **iOS App Store:** Download from the App Store [here](https://itunes.apple.com/us/app/flycut/id1273639655?mt=8) From cd26c65b4b30fc94d435587206008bf9747a6719 Mon Sep 17 00:00:00 2001 From: Mark Jerde Date: Sat, 1 Aug 2020 22:59:23 -0500 Subject: [PATCH 2/3] Make bezel close when it loses focus The bezel doesn't provide any UI indication when it loses focus and this no longer responds to input. This ranges anywhere from being klunky to being a bug. Users have reported that they believed Flycut to have hung when encountering this. This defines a protocol for the BezelWindow's delegate, which had previously just been a blind id delegate and makes the new delegate inherit from NSWindowDelegate so that AppController can receive windowDidResignKey: to indicate when focus is lost and immediately close the bezel. --- AppController.h | 3 ++- AppController.m | 8 +++++++- UI/BezelWindow.h | 13 ++++++++++--- UI/BezelWindow.m | 5 +++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/AppController.h b/AppController.h index d829182..0ccfead 100755 --- a/AppController.h +++ b/AppController.h @@ -22,7 +22,7 @@ @class SGHotKey; -@interface AppController : NSObject { +@interface AppController : NSObject { BezelWindow *bezel; SGHotKey *mainHotKey; IBOutlet SRRecorderControl *mainRecorder; @@ -97,6 +97,7 @@ -(void) processBezelKeyDown:(NSEvent *)theEvent; -(void) processBezelMouseEvents:(NSEvent *)theEvent; -(void) metaKeysReleased; +-(void) windowDidResignKey:(NSNotification *)notification; // Menu related -(void) updateMenu; diff --git a/AppController.m b/AppController.m index 1940775..7d308f8 100755 --- a/AppController.m +++ b/AppController.m @@ -758,6 +758,12 @@ - (void)metaKeysReleased } } +- (void)windowDidResignKey:(NSNotification *)notification { + if ( isBezelPinned ) { + [self hideApp]; + } +} + -(void)fakeKey:(NSNumber*) keyCode withCommandFlag:(BOOL) setFlag /*" +fakeKey synthesizes keyboard events. "*/ { @@ -1059,8 +1065,8 @@ - (void) hideBezel -(void)hideApp { - [self hideBezel]; isBezelPinned = NO; + [self hideBezel]; [NSApp hide:self]; } diff --git a/UI/BezelWindow.h b/UI/BezelWindow.h index 946a1f0..0a6f9a6 100755 --- a/UI/BezelWindow.h +++ b/UI/BezelWindow.h @@ -14,6 +14,13 @@ #import "RoundRecBezierPath.h" #import "RoundRecTextField.h" +@protocol BezelWindowDelegate + +-(void)processBezelKeyDown:(NSEvent *)theEvent; +-(void)processBezelMouseEvents:(NSEvent *)theEvent; +-(void)metaKeysReleased; + +@end @interface BezelWindow : NSPanel { // "n of n" text in bezel @@ -33,7 +40,7 @@ RoundRecTextField *textField; RoundRecTextField *charField; NSImageView *iconView; - id delegate; + id delegate; Boolean color; } @@ -57,7 +64,7 @@ - (void)setDate:(NSString *)newDate; - (void)setSourceIcon:(NSImage *)newSourceIcon; -- (id)delegate; -- (void)setDelegate:(id)newDelegate; +- (id)delegate; +- (void)setDelegate:(id)newDelegate; @end diff --git a/UI/BezelWindow.m b/UI/BezelWindow.m index 676bf3c..c45135d 100755 --- a/UI/BezelWindow.m +++ b/UI/BezelWindow.m @@ -365,12 +365,13 @@ - (void)flagsChanged:(NSEvent *)theEvent { } } -- (id)delegate { +- (id)delegate { return delegate; } -- (void)setDelegate:(id)newDelegate { +- (void)setDelegate:(id)newDelegate { delegate = newDelegate; + super.delegate = newDelegate; } @end From 8d88100d439baf279a896e3f879e77ed00401d08 Mon Sep 17 00:00:00 2001 From: Gennadii Potapov Date: Tue, 15 Dec 2020 18:05:03 +0800 Subject: [PATCH 3/3] Create FUNDING.yml --- .github/FUNDING.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..39ee2a2 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: TermiT +custom: https://paypal.me/flycut