mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Do not render full screen windows as inactive
The text view itself will still dim the selection, but document tabs, status, and tool bars no longer change colors. This seems consistent with how Apple’s controls act and is necessary for the status bar since it draws a transparent gradient over the window background, so only its borders got the dimmed look.
This commit is contained in:
@@ -205,7 +205,7 @@ OAK_DEBUG_VAR(OakControl);
|
||||
if(states[i].active)
|
||||
res |= states[i].requisite;
|
||||
}
|
||||
if(res & layer_t::window_main || res & layer_t::window_key)
|
||||
if(res & layer_t::window_main || res & layer_t::window_key || [[self window] styleMask] & NSFullScreenWindowMask)
|
||||
res |= layer_t::window_main_or_key;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
- (void)tmWindowDidChangeStatus:(NSNotification*)aNotification
|
||||
{
|
||||
self.renderInactive = ![self.window isKeyWindow] && ![self.window isMainWindow];
|
||||
self.renderInactive = !([self.window styleMask] & NSFullScreenWindowMask) && ![self.window isKeyWindow] && ![self.window isMainWindow];
|
||||
}
|
||||
|
||||
- (void)setRenderInactive:(BOOL)flag
|
||||
|
||||
@@ -134,12 +134,12 @@ NSComboBox* OakCreateComboBox (NSObject* accessibilityLabel)
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidChangeMainOrKey:) name:NSWindowDidResignKeyNotification object:newWindow];
|
||||
}
|
||||
|
||||
self.usePrimaryColor = [newWindow isMainWindow] || [newWindow isKeyWindow];
|
||||
self.usePrimaryColor = ([newWindow styleMask] & NSFullScreenWindowMask) || [newWindow isMainWindow] || [newWindow isKeyWindow];
|
||||
}
|
||||
|
||||
- (void)windowDidChangeMainOrKey:(NSNotification*)aNotification
|
||||
{
|
||||
self.usePrimaryColor = [self.window isMainWindow] || [self.window isKeyWindow];
|
||||
self.usePrimaryColor = ([self.window styleMask] & NSFullScreenWindowMask) || [self.window isMainWindow] || [self.window isKeyWindow];
|
||||
}
|
||||
|
||||
- (void)setUsePrimaryColor:(BOOL)flag
|
||||
|
||||
Reference in New Issue
Block a user