Merge pull request #113 from whitingj/master

This pull request fixes #45
This commit is contained in:
Gennadii Potapov 2016-08-10 14:15:03 +08:00 committed by GitHub
commit 9adbacf412
3 changed files with 9 additions and 4 deletions

View file

@ -1089,7 +1089,9 @@
- (void)hitMainHotKey:(SGHotKey *)hotKey - (void)hitMainHotKey:(SGHotKey *)hotKey
{ {
if ( ! isBezelDisplayed ) { if ( ! isBezelDisplayed ) {
[NSApp activateIgnoringOtherApps:YES]; //Do NOT activate the app so focus stays on app the user is interacting with
//https://github.com/TermiT/Flycut/issues/45
//[NSApp activateIgnoringOtherApps:YES];
if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"stickyBezel"] ) { if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"stickyBezel"] ) {
isBezelPinned = YES; isBezelPinned = YES;
} }

View file

@ -15,7 +15,7 @@
#import "RoundRecTextField.h" #import "RoundRecTextField.h"
@interface BezelWindow : NSWindow { @interface BezelWindow : NSPanel {
// "n of n" text in bezel // "n of n" text in bezel
NSString *charString; // Slightly misleading, as this can be longer than one character NSString *charString; // Slightly misleading, as this can be longer than one character
NSString *title; NSString *title;

View file

@ -20,13 +20,16 @@ static const float lineHeight = 16;
backing:(NSBackingStoreType)bufferingType backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag defer:(BOOL)flag
showSource:(BOOL)showSource { showSource:(BOOL)showSource {
self = [super initWithContentRect:contentRect self = [super initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask styleMask:NSNonactivatingPanelMask | NSBorderlessWindowMask
backing:NSBackingStoreBuffered backing:NSBackingStoreBuffered
defer:NO]; defer:NO];
if ( self ) if ( self )
{ {
//set this window to be on top of all other windows
[self setLevel:NSScreenSaverWindowLevel];
[self setOpaque:NO]; [self setOpaque:NO];
[self setAlphaValue:1.0]; [self setAlphaValue:1.0];
[self setOpaque:NO]; [self setOpaque:NO];