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
{
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"] ) {
isBezelPinned = YES;
}

View file

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

View file

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