Skip to content

Commit

Permalink
Removed the ability to momentarily toggle focus follows mouse (it was…
Browse files Browse the repository at this point in the history
… just annoying)
  • Loading branch information
fjolnir committed Oct 22, 2013
1 parent d667180 commit f9e159f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Afloat.m
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ - (void) mouseEntered:(NSEvent*) e {
[self animateFadeInForWindow:[e window]];

BOOL focusFollowsMouse = [[AfloatStorage globalValueForKey:@"FocusFollowsMouse"] boolValue];
BOOL commandDown = [NSEvent modifierFlags] & NSCommandKeyMask ? YES : NO;
if(((focusFollowsMouse && !commandDown) || (!focusFollowsMouse && commandDown)) && ![[e window] isKeyWindow]) {
BOOL modsDown = ([NSEvent modifierFlags] & NSCommandKeyMask) ? YES : NO;
if(focusFollowsMouse && !modsDown && ![[e window] isKeyWindow]) {
[[e window] makeKeyAndOrderFront:nil];
[NSApp activateIgnoringOtherApps:YES];
}
Expand Down

0 comments on commit f9e159f

Please sign in to comment.