mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
applicationShouldHandleReopen:hasVisibleWindows: hardcoded a check for the main window and prefs window; now check for a visible main window
This commit is contained in:
parent
c204c68994
commit
6ae79cdb91
1 changed files with 8 additions and 2 deletions
|
@ -621,8 +621,14 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
|
||||
- (BOOL) applicationShouldHandleReopen: (NSApplication *) app hasVisibleWindows: (BOOL) visibleWindows
|
||||
{
|
||||
if (![fWindow isVisible] && ![[fPrefsController window] isVisible])
|
||||
[fWindow makeKeyAndOrderFront: nil];
|
||||
if (visibleWindows)
|
||||
{
|
||||
for (NSWindow * window in [NSApp windows])
|
||||
if ([window isVisible] && [window canBecomeMainWindow])
|
||||
return NO;
|
||||
}
|
||||
|
||||
[fWindow makeKeyAndOrderFront: nil];
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue