Skip to content

Commit

Permalink
Improve code order
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper committed Jan 2, 2016
1 parent a68f49d commit 9ff93b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Phoenix/PHWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ + (instancetype) focusedWindow {

+ (NSArray<PHWindow *> *) visibleWindowsInOrder {

NSArray<PHWindow *> *windows = [self windows];
NSMutableArray<PHWindow *> *orderedWindows = [NSMutableArray array];

// Windows returned in order from front to back
NSArray *visibleWindowInfo = CFBridgingRelease(CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly |
kCGWindowListExcludeDesktopElements,
kCGNullWindowID));
NSArray<PHWindow *> *windows = [self windows];
NSMutableArray<PHWindow *> *orderedWindows = [NSMutableArray array];

for (NSMutableDictionary<NSString *, id> *windowInfo in visibleWindowInfo) {

Expand Down

0 comments on commit 9ff93b5

Please sign in to comment.