diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 12a147ebc2b3..b7eccd2a6c7c 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -152,6 +152,7 @@ static const CGFloat kAtomWindowCornerRadius = 4.0; bool enable_larger_than_screen_; } @property BOOL acceptsFirstMouse; +@property BOOL disableAutoHideCursor; - (void)setShell:(atom::NativeWindowMac*)shell; - (void)setEnableLargerThanScreen:(bool)enable; @end @@ -347,6 +348,11 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents, options.Get(switches::kAcceptFirstMouse, &acceptsFirstMouse); [window_ setAcceptsFirstMouse:acceptsFirstMouse]; + // Disable auto-hiding cursor. + bool disableAutoHideCursor = false; + options.Get(switches::kDisableAutoHideCursor, &disableAutoHideCursor); + [window_ setDisableAutoHideCursor:disableAutoHideCursor]; + // Disable fullscreen button when 'fullscreen' is specified to false. bool fullscreen; if (!(options.Get(switches::kFullscreen, &fullscreen) && diff --git a/atom/common/options_switches.cc b/atom/common/options_switches.cc index f67a6456964c..c479b5004d07 100644 --- a/atom/common/options_switches.cc +++ b/atom/common/options_switches.cc @@ -75,6 +75,9 @@ const char kTransparent[] = "transparent"; // Window type hint. const char kType[] = "type"; +// Disable auto-hiding cursor. +const char kDisableAutoHideCursor[] = "disable-auto-hide-cursor"; + // Web runtime features. const char kExperimentalFeatures[] = "experimental-features"; const char kExperimentalCanvasFeatures[] = "experimental-canvas-features"; diff --git a/atom/common/options_switches.h b/atom/common/options_switches.h index 967f62638733..546c6a04eb4d 100644 --- a/atom/common/options_switches.h +++ b/atom/common/options_switches.h @@ -41,6 +41,7 @@ extern const char kGuestInstanceID[]; extern const char kPreloadScript[]; extern const char kTransparent[]; extern const char kType[]; +extern const char kDisableAutoHideCursor[]; extern const char kExperimentalFeatures[]; extern const char kExperimentalCanvasFeatures[];