mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-19 01:29:21 +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 *windowNumbers = [NSWindow windowNumbersWithOptions:NSWindowNumberListAllApplications];
|
||||
NSUInteger minZIndex = NSNotFound;
|
||||
NSDictionary *infoDict = nil;
|
||||
NSDictionary *infoDict = @{};
|
||||
for(NSDictionary *windowDict in currentWindows) {
|
||||
NSString *windowTitle = windowDict[(NSString *)kCGWindowName];
|
||||
/* skip a list of well know useless window-titles */
|
||||
|
||||
Reference in New Issue
Block a user