From 9f186fb2a88efc76885622faccaf43a283280f08 Mon Sep 17 00:00:00 2001 From: Marco Fabbri Date: Wed, 26 Nov 2014 16:41:12 +0100 Subject: [PATCH] Add Mac OS X Implementation for Window.setVisibleOnAllWorkspaces - Add Mac OS X implementation for rogerwang/node-webkit#2523 . --- src/browser/native_window_mac.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/browser/native_window_mac.mm b/src/browser/native_window_mac.mm index a5fb580261..fe3e4a3884 100644 --- a/src/browser/native_window_mac.mm +++ b/src/browser/native_window_mac.mm @@ -634,7 +634,13 @@ - (void)drawRect:(NSRect)dirtyRect { } void NativeWindowCocoa::SetVisibleOnAllWorkspaces(bool all_workspaces) { - // @TODO @mrfabbri NOT IMPLEMENTED + NSUInteger collectionBehavior = [window() collectionBehavior]; + if (all_workspaces) { + collectionBehavior |= NSWindowCollectionBehaviorCanJoinAllSpaces; + } else { + collectionBehavior &= ~NSWindowCollectionBehaviorCanJoinAllSpaces; + } + [window() setCollectionBehavior:collectionBehavior]; } void NativeWindowCocoa::SetShowInTaskbar(bool show) {