Skip to content

Commit 9adbacf

Browse files
authored
Merge pull request #113 from whitingj/master
This pull request fixes #45
2 parents aa14d73 + 50b2cb7 commit 9adbacf

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

AppController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,9 @@ - (void) applicationWillResignActive:(NSApplication *)app; {
10891089
- (void)hitMainHotKey:(SGHotKey *)hotKey
10901090
{
10911091
if ( ! isBezelDisplayed ) {
1092-
[NSApp activateIgnoringOtherApps:YES];
1092+
//Do NOT activate the app so focus stays on app the user is interacting with
1093+
//https://github.com/TermiT/Flycut/issues/45
1094+
//[NSApp activateIgnoringOtherApps:YES];
10931095
if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"stickyBezel"] ) {
10941096
isBezelPinned = YES;
10951097
}

UI/BezelWindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#import "RoundRecTextField.h"
1616

1717

18-
@interface BezelWindow : NSWindow {
18+
@interface BezelWindow : NSPanel {
1919
// "n of n" text in bezel
2020
NSString *charString; // Slightly misleading, as this can be longer than one character
2121
NSString *title;

UI/BezelWindow.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ - (id)initWithContentRect:(NSRect)contentRect
2020
backing:(NSBackingStoreType)bufferingType
2121
defer:(BOOL)flag
2222
showSource:(BOOL)showSource {
23-
23+
2424
self = [super initWithContentRect:contentRect
25-
styleMask:NSBorderlessWindowMask
25+
styleMask:NSNonactivatingPanelMask | NSBorderlessWindowMask
2626
backing:NSBackingStoreBuffered
2727
defer:NO];
2828
if ( self )
2929
{
30+
//set this window to be on top of all other windows
31+
[self setLevel:NSScreenSaverWindowLevel];
32+
3033
[self setOpaque:NO];
3134
[self setAlphaValue:1.0];
3235
[self setOpaque:NO];

0 commit comments

Comments
 (0)