Mac: Fix window sharing type (issue #1884)
This commit is contained in:
parent
e41a763307
commit
acdb4bb564
|
@ -217,12 +217,12 @@ bool CefBrowserPlatformDelegateNativeMac::CreateHostWindow() {
|
||||||
|
|
||||||
parentView = [newWnd contentView];
|
parentView = [newWnd contentView];
|
||||||
window_info_.parent_view = parentView;
|
window_info_.parent_view = parentView;
|
||||||
}
|
|
||||||
|
|
||||||
// Make the content view for the window have a layer. This will make all
|
// Make the content view for the window have a layer. This will make all
|
||||||
// sub-views have layers. This is necessary to ensure correct layer
|
// sub-views have layers. This is necessary to ensure correct layer
|
||||||
// ordering of all child views and their layers.
|
// ordering of all child views and their layers.
|
||||||
[[[parentView window] contentView] setWantsLayer:YES];
|
[parentView setWantsLayer:YES];
|
||||||
|
}
|
||||||
|
|
||||||
host_window_created_ = true;
|
host_window_created_ = true;
|
||||||
|
|
||||||
|
|
|
@ -468,7 +468,8 @@ void RootWindowMac::CreateRootWindow(const CefBrowserSettings& settings) {
|
||||||
styleMask:(NSTitledWindowMask |
|
styleMask:(NSTitledWindowMask |
|
||||||
NSClosableWindowMask |
|
NSClosableWindowMask |
|
||||||
NSMiniaturizableWindowMask |
|
NSMiniaturizableWindowMask |
|
||||||
NSResizableWindowMask )
|
NSResizableWindowMask |
|
||||||
|
NSUnifiedTitleAndToolbarWindowMask )
|
||||||
backing:NSBackingStoreBuffered
|
backing:NSBackingStoreBuffered
|
||||||
defer:NO];
|
defer:NO];
|
||||||
[window_ setTitle:@"cefclient"];
|
[window_ setTitle:@"cefclient"];
|
||||||
|
@ -494,6 +495,13 @@ void RootWindowMac::CreateRootWindow(const CefBrowserSettings& settings) {
|
||||||
NSView* contentView = [window_ contentView];
|
NSView* contentView = [window_ contentView];
|
||||||
NSRect contentBounds = [contentView bounds];
|
NSRect contentBounds = [contentView bounds];
|
||||||
|
|
||||||
|
if (!with_osr_) {
|
||||||
|
// Make the content view for the window have a layer. This will make all
|
||||||
|
// sub-views have layers. This is necessary to ensure correct layer
|
||||||
|
// ordering of all child views and their layers.
|
||||||
|
[contentView setWantsLayer:YES];
|
||||||
|
}
|
||||||
|
|
||||||
if (with_controls_) {
|
if (with_controls_) {
|
||||||
// Create the buttons.
|
// Create the buttons.
|
||||||
NSRect button_rect = contentBounds;
|
NSRect button_rect = contentBounds;
|
||||||
|
|
Loading…
Reference in New Issue