Skip to content

Commit

Permalink
이슈 7866 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
kimorkim committed Nov 27, 2017
1 parent b021db2 commit 6022a45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/entry_offline.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ global.sharedObject = {
roomId: '',
mainWindowId: '',
workingPath: '',
isInitEntry: false,
}

function logger(text) {
Expand Down Expand Up @@ -191,12 +192,13 @@ if (shouldQuit) {
});

mainWindow.on('close', function (e) {
if (!isForceClose) {
if (!isForceClose && global.sharedObject.isInitEntry) {
e.preventDefault();
cwm.closeHardwareWindow();
mainWindow.webContents.send('mainClose');
}
});

mainWindow.on('closed', function () {
mainWindow = null;
app.quit();
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/require.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const sharedObject = remote.getGlobal('sharedObject');
const mainWindowId = sharedObject.mainWindowId;
const _mainWindow = BrowserWindow.fromId(mainWindowId);
const archiver = require('archiver');
sharedObject.isInitEntry = false;

import parser from './bower_components/entryjs/extern/util/filbert.js';
const filbert = parser;
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ angular.module('workspace').controller("WorkspaceController", ['$scope', '$rootS

// 기본 초기화를 수행수 동작한다.
Entry.plugin.init(function(isPracticalCourseMode) {
sharedObject.isInitEntry = true;
if (isPracticalCourseMode === true) {
isPracticalCourse = true;
addPracticalNoticePopup();
Expand Down Expand Up @@ -165,11 +166,11 @@ angular.module('workspace').controller("WorkspaceController", ['$scope', '$rootS
})
}


ipcRenderer.on('mainClose', function () {
if(!unloadCheckFunc()) {
return;
}

window.onbeforeunload = null;
ipcRenderer.send('forceClose', true);
});
Expand Down

0 comments on commit 6022a45

Please sign in to comment.