diff --git a/AppController.m b/AppController.m index 573b778..903d500 100755 --- a/AppController.m +++ b/AppController.m @@ -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; } diff --git a/UI/BezelWindow.h b/UI/BezelWindow.h index c295351..946a1f0 100755 --- a/UI/BezelWindow.h +++ b/UI/BezelWindow.h @@ -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; diff --git a/UI/BezelWindow.m b/UI/BezelWindow.m index 6eff3e5..676bf3c 100755 --- a/UI/BezelWindow.m +++ b/UI/BezelWindow.m @@ -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];