Skip to content

Commit b841142

Browse files
committed
Support Snow Leopard Transparency
1 parent 6c790d8 commit b841142

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/browser/native_window_mac.mm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,13 @@ - (NSRect)contentRectForFrameRect:(NSRect)frameRect {
445445

446446
void NativeWindowCocoa::SetTransparent() {
447447
is_transparent_ = true;
448-
restored_bounds_ = [window() frame];
449-
[window() setStyleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
450-
[window() setFrame:[window()
448+
if(base::mac::IsOSMountainLionOrLater()) {
449+
restored_bounds_ = [window() frame];
450+
[window() setStyleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
451+
[window() setFrame:[window()
451452
frameRectForContentRect:[window() frame]]
452453
display:YES];
454+
}
453455
[window() setHasShadow:NO];
454456
ShellNSWindow* swin = (ShellNSWindow*)window();
455457
[swin setTransparent];

0 commit comments

Comments
 (0)