Move NSTouchBarDelegate to AtomNSWindowDelegate
This commit is contained in:
parent
8e9667d86c
commit
f6a7e5ea23
3 changed files with 20 additions and 13 deletions
|
@ -209,7 +209,7 @@ enum {
|
|||
|
||||
#endif
|
||||
|
||||
@interface AtomNSWindow : EventDispatchingWindow<QLPreviewPanelDataSource, QLPreviewPanelDelegate, NSTouchBarDelegate> {
|
||||
@interface AtomNSWindow : EventDispatchingWindow<QLPreviewPanelDataSource, QLPreviewPanelDelegate> {
|
||||
@private
|
||||
atom::NativeWindowMac* shell_;
|
||||
bool enable_larger_than_screen_;
|
||||
|
@ -252,14 +252,6 @@ enum {
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar
|
||||
makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier API_AVAILABLE(macosx(10.12.2)) {
|
||||
if (touchBar && shell_->atom_touch_bar())
|
||||
return [shell_->atom_touch_bar() makeItemForIdentifier:identifier];
|
||||
else
|
||||
return nil;
|
||||
}
|
||||
|
||||
// NSWindow overrides.
|
||||
|
||||
- (void)swipeWithEvent:(NSEvent *)event {
|
||||
|
@ -1515,9 +1507,10 @@ void NativeWindowMac::SetTouchBar(
|
|||
if (![window_ respondsToSelector:@selector(touchBar)])
|
||||
return;
|
||||
|
||||
atom_touch_bar_.reset([[AtomTouchBar alloc] initWithDelegate:window_.get()
|
||||
window:this
|
||||
settings:items]);
|
||||
atom_touch_bar_.reset([[AtomTouchBar alloc]
|
||||
initWithDelegate:window_delegate_.get()
|
||||
window:this
|
||||
settings:items]);
|
||||
[window_ setTouchBar:nil];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue