-
-
Save pencilcheck/510681 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSNumber *windowLevelIndex = [[NSUserDefaults standardUserDefaults] objectForKey:@"DesktopBackgroundLevel"]; | |
if (windowLevelIndex != nil) { | |
switch ([windowLevelIndex integerValue]) { | |
case 0: // Show behind the desktop icons, but on the desktop - ignored by Exposé | |
[window setLevel:kCGDesktopWindowLevel]; | |
[window setIgnoresMouseEvents:YES]; | |
[window orderBack:self]; | |
break; | |
case 1: // Show above the desktop icons - still ignored by Exposé | |
[window setLevel:kCGDesktopIconWindowLevel]; | |
[window setIgnoresMouseEvents:NO]; | |
[window orderFront:self]; | |
break; | |
default: | |
break; | |
} | |
} | |
[window clearExposeTags]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment