mirror of
https://github.com/MacPass/MacPass.git
synced 2026-02-02 05:18:15 +00:00
Fixed broken API contract of returned nil value for non-nil behaviour. Now returning empty dictionary instead
This commit is contained in:
@@ -35,7 +35,7 @@ BOOL skipWindowTitle(NSString *windowTitle) {
|
|||||||
NSArray *currentWindows = CFBridgingRelease(CGWindowListCopyWindowInfo(kCGWindowListExcludeDesktopElements, kCGNullWindowID));
|
NSArray *currentWindows = CFBridgingRelease(CGWindowListCopyWindowInfo(kCGWindowListExcludeDesktopElements, kCGNullWindowID));
|
||||||
NSArray *windowNumbers = [NSWindow windowNumbersWithOptions:NSWindowNumberListAllApplications];
|
NSArray *windowNumbers = [NSWindow windowNumbersWithOptions:NSWindowNumberListAllApplications];
|
||||||
NSUInteger minZIndex = NSNotFound;
|
NSUInteger minZIndex = NSNotFound;
|
||||||
NSDictionary *infoDict = nil;
|
NSDictionary *infoDict = @{};
|
||||||
for(NSDictionary *windowDict in currentWindows) {
|
for(NSDictionary *windowDict in currentWindows) {
|
||||||
NSString *windowTitle = windowDict[(NSString *)kCGWindowName];
|
NSString *windowTitle = windowDict[(NSString *)kCGWindowName];
|
||||||
/* skip a list of well know useless window-titles */
|
/* skip a list of well know useless window-titles */
|
||||||
|
|||||||
Reference in New Issue
Block a user