Skip to content
Snippets Groups Projects
Commit a89e0e3b authored by George Nachman's avatar George Nachman
Browse files

Make sure lion full screen windows restored from an arrangement open on the...

Make sure lion full screen windows restored from an arrangement open on the proper screen even if the screen's frame doesn't match what's in the arrangement. Issue 6043
parent b3b02933
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -621,6 +621,8 @@ static NSRect iTermRectCenteredVerticallyWithinRect(NSRect frameToCenter, NSRect
DLog(@"initWithContentRect:%@ styleMask:%d", [NSValue valueWithRect:initialFrame], (int)styleMask);
iTermTerminalWindow *myWindow;
Class windowClass = (hotkeyWindowType == iTermHotkeyWindowTypeFloatingPanel) ? [iTermPanel class] : [iTermWindow class];
// TODO: Some day when I have more appetite for risk, I think this should be
// myWindow = [[windowClass alloc] initWithContentRect:[NSWindow contentRectForFrameRect:initialFrame styleMask:styleMask]
myWindow = [[windowClass alloc] initWithContentRect:initialFrame
styleMask:styleMask
backing:NSBackingStoreBuffered
Loading
Loading
@@ -2274,6 +2276,16 @@ ITERM_WEAKLY_REFERENCEABLE
rect.size.width = [[arrangement objectForKey:TERMINAL_ARRANGEMENT_WIDTH] doubleValue];
rect.size.height = [[arrangement objectForKey:TERMINAL_ARRANGEMENT_HEIGHT] doubleValue];
 
// TODO: The anchored screen isn't always respected, e.g., if the screen's origin/size changes
// then rect might not lie inside it.
if (windowType == WINDOW_TYPE_LION_FULL_SCREEN) {
NSArray *screens = [NSScreen screens];
if (_anchoredScreenNumber >= 0 && _anchoredScreenNumber < screens.count) {
NSScreen *screen = screens[_anchoredScreenNumber];
rect = [self traditionalFullScreenFrameForScreen:screen];
}
}
// 10.11 starts you off with a tiny little frame. I don't know why they do
// that, but this fixes it.
if ([[self class] useElCapitanFullScreenLogic] &&
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment