mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Remove unnecessary comment + respondsToSelector for isSwipeTrackingFromScrollEventsEnabled implementation
This commit is contained in:
@@ -40,9 +40,6 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
|
||||
void UnsubscribeLocalNotification(int request_id);
|
||||
v8::Local<v8::Value> GetUserDefault(const std::string& name,
|
||||
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();
|
||||
#endif
|
||||
bool IsDarkMode();
|
||||
|
||||
@@ -123,9 +123,7 @@ bool SystemPreferences::IsDarkMode() {
|
||||
}
|
||||
|
||||
bool SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled() {
|
||||
SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled);
|
||||
return [NSEvent respondsToSelector:selector] &&
|
||||
[NSEvent performSelector:selector];
|
||||
return [NSEvent isSwipeTrackingFromScrollEventsEnabled];
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
Reference in New Issue
Block a user