Fix new clang warnings
This commit is contained in:
parent
c44279bb10
commit
aa5c80f8a6
1 changed files with 15 additions and 12 deletions
|
@ -1224,25 +1224,28 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
||||||
|
|
||||||
void NativeWindowMac::SetTouchBar(
|
void NativeWindowMac::SetTouchBar(
|
||||||
const std::vector<mate::PersistentDictionary>& items) {
|
const std::vector<mate::PersistentDictionary>& items) {
|
||||||
if (![window_ respondsToSelector:@selector(touchBar)])
|
if (@available(macOS 10.12.2, *)) {
|
||||||
return;
|
touch_bar_.reset([[AtomTouchBar alloc]
|
||||||
|
initWithDelegate:window_delegate_.get()
|
||||||
touch_bar_.reset([[AtomTouchBar alloc]
|
window:this
|
||||||
initWithDelegate:window_delegate_.get()
|
settings:items]);
|
||||||
window:this
|
[window_ setTouchBar:nil];
|
||||||
settings:items]);
|
}
|
||||||
[window_ setTouchBar:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::RefreshTouchBarItem(const std::string& item_id) {
|
void NativeWindowMac::RefreshTouchBarItem(const std::string& item_id) {
|
||||||
if (touch_bar_ && [window_ touchBar])
|
if (@available(macOS 10.12.2, *)) {
|
||||||
[touch_bar_ refreshTouchBarItem:[window_ touchBar] id:item_id];
|
if (touch_bar_ && [window_ touchBar])
|
||||||
|
[touch_bar_ refreshTouchBarItem:[window_ touchBar] id:item_id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::SetEscapeTouchBarItem(
|
void NativeWindowMac::SetEscapeTouchBarItem(
|
||||||
const mate::PersistentDictionary& item) {
|
const mate::PersistentDictionary& item) {
|
||||||
if (touch_bar_ && [window_ touchBar])
|
if (@available(macOS 10.12.2, *)) {
|
||||||
[touch_bar_ setEscapeTouchBarItem:item forTouchBar:[window_ touchBar]];
|
if (touch_bar_ && [window_ touchBar])
|
||||||
|
[touch_bar_ setEscapeTouchBarItem:item forTouchBar:[window_ touchBar]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindowMac::ContentBoundsToWindowBounds(
|
gfx::Rect NativeWindowMac::ContentBoundsToWindowBounds(
|
||||||
|
|
Loading…
Reference in a new issue