From 69638a399cfd5b6fbb429d1774a87f3505f6a18e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 27 Feb 2017 10:49:45 -0800 Subject: [PATCH] Make touchBar readwrite/nullable --- atom/browser/native_window_mac.mm | 4 ++-- atom/browser/ui/cocoa/touch_bar_forward_declarations.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index a9eddb0ca04b..6c6847b269fd 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -377,7 +377,7 @@ bool ScopedDisableResize::disable_resize_ = false; - (void)resetTouchBar { bar_items_ = [[NSMutableArray alloc] init]; - // self.touchBar = nil; + self.touchBar = nil; } - (NSMutableArray*)identifierArrayFromDicts:(std::vector)dicts { @@ -435,7 +435,7 @@ bool ScopedDisableResize::disable_resize_ = false; std::map new_map; item_id_map = new_map; bar_items_ = [self identifierArrayFromDicts:shell_->GetTouchBarItems()]; - // self.touchBar = nil; + self.touchBar = nil; } - (NSTouchBar*)makeTouchBar { diff --git a/atom/browser/ui/cocoa/touch_bar_forward_declarations.h b/atom/browser/ui/cocoa/touch_bar_forward_declarations.h index c6fdd1f79137..e9a6e5525b66 100644 --- a/atom/browser/ui/cocoa/touch_bar_forward_declarations.h +++ b/atom/browser/ui/cocoa/touch_bar_forward_declarations.h @@ -121,7 +121,7 @@ static const NSTouchBarItemIdentifier NSTouchBarItemIdentifierOtherItemsProxy = @interface NSWindow (TouchBarSDK) -@property(strong, readonly) NSTouchBar* touchBar; +@property(strong, readwrite, nullable) NSTouchBar* touchBar; @end