Skip to content

Commit fe6b606

Browse files
committed
Merge branch 'master' of github.com:TermiT/Flycut
2 parents 2d9b7d2 + 8d88100 commit fe6b606

File tree

6 files changed

+27
-8
lines changed

6 files changed

+27
-8
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: TermiT
4+
custom: https://paypal.me/flycut

AppController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
@class SGHotKey;
2424

25-
@interface AppController : NSObject <NSMenuDelegate, NSApplicationDelegate, NSAlertDelegate, FlycutStoreDelegate, FlycutOperatorDelegate> {
25+
@interface AppController : NSObject <NSMenuDelegate, NSApplicationDelegate, NSAlertDelegate, FlycutStoreDelegate, FlycutOperatorDelegate, BezelWindowDelegate> {
2626
BezelWindow *bezel;
2727
SGHotKey *mainHotKey;
2828
IBOutlet SRRecorderControl *mainRecorder;
@@ -97,6 +97,7 @@
9797
-(void) processBezelKeyDown:(NSEvent *)theEvent;
9898
-(void) processBezelMouseEvents:(NSEvent *)theEvent;
9999
-(void) metaKeysReleased;
100+
-(void) windowDidResignKey:(NSNotification *)notification;
100101

101102
// Menu related
102103
-(void) updateMenu;

AppController.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,12 @@ - (void)metaKeysReleased
758758
}
759759
}
760760

761+
- (void)windowDidResignKey:(NSNotification *)notification {
762+
if ( isBezelPinned ) {
763+
[self hideApp];
764+
}
765+
}
766+
761767
-(void)fakeKey:(NSNumber*) keyCode withCommandFlag:(BOOL) setFlag
762768
/*" +fakeKey synthesizes keyboard events. "*/
763769
{
@@ -1059,8 +1065,8 @@ - (void) hideBezel
10591065

10601066
-(void)hideApp
10611067
{
1062-
[self hideBezel];
10631068
isBezelPinned = NO;
1069+
[self hideBezel];
10641070
[NSApp hide:self];
10651071
}
10661072

UI/BezelWindow.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
#import "RoundRecBezierPath.h"
1515
#import "RoundRecTextField.h"
1616

17+
@protocol BezelWindowDelegate <NSWindowDelegate>
18+
19+
-(void)processBezelKeyDown:(NSEvent *)theEvent;
20+
-(void)processBezelMouseEvents:(NSEvent *)theEvent;
21+
-(void)metaKeysReleased;
22+
23+
@end
1724

1825
@interface BezelWindow : NSPanel {
1926
// "n of n" text in bezel
@@ -33,7 +40,7 @@
3340
RoundRecTextField *textField;
3441
RoundRecTextField *charField;
3542
NSImageView *iconView;
36-
id delegate;
43+
id<BezelWindowDelegate> delegate;
3744
Boolean color;
3845
}
3946

@@ -57,7 +64,7 @@
5764
- (void)setDate:(NSString *)newDate;
5865
- (void)setSourceIcon:(NSImage *)newSourceIcon;
5966

60-
- (id)delegate;
61-
- (void)setDelegate:(id)newDelegate;
67+
- (id<BezelWindowDelegate>)delegate;
68+
- (void)setDelegate:(id<BezelWindowDelegate>)newDelegate;
6269

6370
@end

UI/BezelWindow.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,13 @@ - (void)flagsChanged:(NSEvent *)theEvent {
365365
}
366366
}
367367

368-
- (id)delegate {
368+
- (id<BezelWindowDelegate>)delegate {
369369
return delegate;
370370
}
371371

372-
- (void)setDelegate:(id)newDelegate {
372+
- (void)setDelegate:(id<BezelWindowDelegate>)newDelegate {
373373
delegate = newDelegate;
374+
super.delegate = newDelegate;
374375
}
375376

376377
@end

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you like Flycut, you can donate [here](https://paypal.me/flycut)
2222
Download from the App Store [here](http://itunes.apple.com/us/app/flycut-clipboard-manager/id442160987?mt=12)
2323

2424
**DRM-Free:**
25-
Download latest DRM-Free version [here](https://github.com/MarkJerde/Flycut/releases/latest)
25+
Download latest DRM-Free version [here](https://github.com/TermiT/Flycut/releases)
2626

2727
**iOS App Store:**
2828
Download from the App Store [here](https://itunes.apple.com/us/app/flycut/id1273639655?mt=8)

0 commit comments

Comments
 (0)