Remove unnecessary comment + respondsToSelector for isSwipeTrackingFromScrollEventsEnabled implementation
This commit is contained in:
parent
617820dfc2
commit
136f10c4e8
2 changed files with 1 additions and 6 deletions
|
@ -40,9 +40,6 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
|
||||||
void UnsubscribeLocalNotification(int request_id);
|
void UnsubscribeLocalNotification(int request_id);
|
||||||
v8::Local<v8::Value> GetUserDefault(const std::string& name,
|
v8::Local<v8::Value> GetUserDefault(const std::string& name,
|
||||||
const std::string& type);
|
const std::string& type);
|
||||||
// On 10.7+, back and forward swipe gestures can be triggered using a scroll
|
|
||||||
// gesture, if enabled in System Preferences. This function returns true if
|
|
||||||
// the feature is supported and enabled, and false otherwise.
|
|
||||||
bool IsSwipeTrackingFromScrollEventsEnabled();
|
bool IsSwipeTrackingFromScrollEventsEnabled();
|
||||||
#endif
|
#endif
|
||||||
bool IsDarkMode();
|
bool IsDarkMode();
|
||||||
|
|
|
@ -123,9 +123,7 @@ bool SystemPreferences::IsDarkMode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled() {
|
bool SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled() {
|
||||||
SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled);
|
return [NSEvent isSwipeTrackingFromScrollEventsEnabled];
|
||||||
return [NSEvent respondsToSelector:selector] &&
|
|
||||||
[NSEvent performSelector:selector];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
Loading…
Reference in a new issue