mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1069658 - The slide-down titlebar in fullscreen mode is transparent on Yosemite. r=mstange
This commit is contained in:
parent
b8f030ed40
commit
3820df645b
@ -141,6 +141,15 @@ class APZCTreeManager;
|
||||
// format since at least OS X 10.5.
|
||||
- (void)_tileTitlebarAndRedisplay:(BOOL)redisplay;
|
||||
|
||||
// The following undocumented methods are used to work around bug 1069658,
|
||||
// which is an Apple bug or design flaw that effects Yosemite. None of them
|
||||
// were present prior to Yosemite (OS X 10.10).
|
||||
- (NSView *)titlebarView; // Method of NSThemeFrame
|
||||
- (NSView *)titlebarContainerView; // Method of NSThemeFrame
|
||||
- (BOOL)transparent; // Method of NSTitlebarView and NSTitlebarContainerView
|
||||
- (void)setTransparent:(BOOL)transparent; // Method of NSTitlebarView and
|
||||
// NSTitlebarContainerView
|
||||
|
||||
@end
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_6) || \
|
||||
|
@ -2256,6 +2256,29 @@ nsCocoaWindow::ExecuteNativeKeyBinding(NativeKeyBindingsType aType,
|
||||
}
|
||||
|
||||
mGeckoWindow->EnteredFullScreen(true);
|
||||
|
||||
// On Yosemite, the NSThemeFrame class has two new properties --
|
||||
// titlebarView (an NSTitlebarView object) and titlebarContainerView (an
|
||||
// NSTitlebarContainerView object). These are used to display the titlebar
|
||||
// in fullscreen mode. In Safari they're not transparent. But in Firefox
|
||||
// for some reason they are, which causes bug 1069658. The following code
|
||||
// works around this Apple bug or design flaw.
|
||||
NSWindow *window = (NSWindow *) [notification object];
|
||||
NSView *frameView = [[window contentView] superview];
|
||||
NSView *titlebarView = nil;
|
||||
NSView *titlebarContainerView = nil;
|
||||
if ([frameView respondsToSelector:@selector(titlebarView)]) {
|
||||
titlebarView = [frameView titlebarView];
|
||||
}
|
||||
if ([frameView respondsToSelector:@selector(titlebarContainerView)]) {
|
||||
titlebarContainerView = [frameView titlebarContainerView];
|
||||
}
|
||||
if ([titlebarView respondsToSelector:@selector(setTransparent:)]) {
|
||||
[titlebarView setTransparent:NO];
|
||||
}
|
||||
if ([titlebarContainerView respondsToSelector:@selector(setTransparent:)]) {
|
||||
[titlebarContainerView setTransparent:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidExitFullScreen:(NSNotification *)notification
|
||||
|
Loading…
x
Reference in New Issue
Block a user