Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit c77290c

Browse files
committed
Added the full screen move for macos on maximize click
1 parent 1ca27d8 commit c77290c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/views/ApplicationComponent.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,18 @@ export class ApplicationComponent extends React.Component<{}, ApplicationState>
8181
maximize={(event: React.MouseEvent<HTMLSpanElement>) => {
8282
let window = remote.getCurrentWindow();
8383
event.stopPropagation();
84-
if (window.isMaximized()) {
85-
window.restore();
84+
if (this.isMacOS()) {
85+
if (window.isFullScreen()) {
86+
window.setFullScreen(false);
87+
} else {
88+
window.setFullScreen(true);
89+
}
8690
} else {
87-
window.maximize();
91+
if (window.isMaximized()) {
92+
window.restore();
93+
} else {
94+
window.maximize();
95+
}
8896
}
8997
}}
9098
close={(event: React.MouseEvent<HTMLSpanElement>) => {

0 commit comments

Comments
 (0)