diff --git a/src/sheet-toolbar.cjsx b/src/sheet-toolbar.cjsx
index b6f2d972d..e3c48cc2e 100644
--- a/src/sheet-toolbar.cjsx
+++ b/src/sheet-toolbar.cjsx
@@ -71,13 +71,35 @@ class ToolbarBack extends React.Component
class ToolbarWindowControls extends React.Component
@displayName: 'ToolbarWindowControls'
+ constructor: (@props) ->
+ @state = {alt: false}
+
+ componentDidMount: =>
+ if process.platform is 'darwin'
+ window.addEventListener('keydown', @_onAlt)
+ window.addEventListener('keyup', @_onAlt)
+
+ componentWillUnmount: =>
+ if process.platform is 'darwin'
+ window.removeEventListener('keydown', @_onAlt)
+ window.removeEventListener('keyup', @_onAlt)
+
render: =>
-
+
-
+
+ _onAlt: (event) =>
+ @setState(alt: event.altKey) if @state.alt isnt event.altKey
+
+ _onMaximize: (event) =>
+ if process.platform is 'darwin' and not event.altKey
+ atom.setFullScreen(!atom.isFullScreen())
+ else
+ atom.maximize()
+
class ToolbarMenuControl extends React.Component
@displayName: 'ToolbarMenuControl'
render: =>
diff --git a/static/images/application-frame/fullscreen@2x.png b/static/images/application-frame/fullscreen@2x.png
new file mode 100644
index 000000000..3f1be7fde
Binary files /dev/null and b/static/images/application-frame/fullscreen@2x.png differ
diff --git a/static/workspace.less b/static/workspace.less
index 619a1361e..3bba60e72 100644
--- a/static/workspace.less
+++ b/static/workspace.less
@@ -108,7 +108,12 @@ atom-workspace {
background-image: url("images/application-frame/minimize@1x.png");
}
.maximize {
- background-image: url("images/application-frame/maximize@1x.png");
+ background-image: url("images/application-frame/fullscreen@1x.png");
+ }
+ &.alt-true {
+ .maximize {
+ background-image: url("images/application-frame/maximize@1x.png");
+ }
}
}
@@ -121,7 +126,12 @@ atom-workspace {
background-image: url("images/application-frame/minimize@2x.png");
}
.maximize {
- background-image: url("images/application-frame/maximize@2x.png");
+ background-image: url("images/application-frame/fullscreen@2x.png");
+ }
+ &.alt-true {
+ .maximize {
+ background-image: url("images/application-frame/maximize@2x.png");
+ }
}
}
}