MCPcopy
hub / github.com/agalwood/Motrix / handleWindowClose

Method handleWindowClose

src/main/ui/WindowManager.js:200–217  ·  view source on GitHub ↗
(pageOptions, page, window)

Source from the content-addressed store, hash-verified

198 }
199
200 handleWindowClose (pageOptions, page, window) {
201 window.on('close', (event) => {
202 if (pageOptions.bindCloseToHide && !this.willQuit) {
203 event.preventDefault()
204
205 // @see https://github.com/electron/electron/issues/20263
206 if (window.isFullScreen()) {
207 window.once('leave-full-screen', () => window.hide())
208
209 window.setFullScreen(false)
210 } else {
211 window.hide()
212 }
213 }
214 const bounds = window.getBounds()
215 this.emit('window-closed', { page, bounds })
216 })
217 }
218
219 showWindow (page) {
220 const window = this.getWindow(page)

Callers 1

openWindowMethod · 0.95

Calls 1

hideMethod · 0.80

Tested by

no test coverage detected