Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Exit full screen on tab close
Browse files Browse the repository at this point in the history
Fix #2404

Auditors: @aekeus
  • Loading branch information
bbondy committed Jul 12, 2016
1 parent c7c6818 commit 8cded9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ const doAction = (action) => {
}
break
case WindowConstants.WINDOW_CLOSE_FRAME:
const currentWindow = require('electron').remote.getCurrentWindow()
if (currentWindow && currentWindow.isFullScreen()) {
currentWindow.setFullScreen(false)
}
// Use the frameProps we passed in, or default to the active frame
const frameProps = action.frameProps || FrameStateUtil.getActiveFrame(windowState)
const closingActive = !action.frameProps || action.frameProps === FrameStateUtil.getActiveFrame(windowState)
Expand Down

1 comment on commit 8cded9c

@aekeus
Copy link
Member

@aekeus aekeus commented on 8cded9c Jul 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ works as described

Please sign in to comment.