# 이슈처리

[17 최소화 선택 시 작업표시줄에 메신저 안보임] :: 최소화시 작업표시줄에 보이고, 닫기 버튼시 작업효시줄에 없어지며 tray 에만 표시하도록 수정.

노티 발생시 작업표시줄에 깜빡이도록 기능 추가.
This commit is contained in:
leejinho 2019-12-04 13:51:50 +09:00
parent ac54b20021
commit d1b7c4585d
3 changed files with 15 additions and 6 deletions

View File

@ -26,7 +26,8 @@ export enum ElectronBrowserWindowChannel {
Show = 'show',
Close = 'close',
Closed = 'closed',
ReadyToShow = 'ready-to-show'
ReadyToShow = 'ready-to-show',
Focus = 'focus'
}
export enum ElectronWebContentsChannel {

View File

@ -65,7 +65,7 @@ export class AppWindow {
this.window = new BrowserWindow(windowOptions);
savedWindowState.manage(this.window);
let quitting = false;
let quitting = true;
app.on(ElectronAppChannel.BeforeQuit, () => {
quitting = true;
});
@ -92,10 +92,14 @@ export class AppWindow {
}
});
this.window.on(ElectronBrowserWindowChannel.Close, e => {
if (!quitting) {
e.preventDefault();
this.window.hide();
}
// if (!quitting) {
e.preventDefault();
this.window.hide();
// }
});
this.window.on(ElectronBrowserWindowChannel.Focus, e => {
console.log(e);
this.window.flashFrame(false);
});
}

View File

@ -350,6 +350,7 @@ ipcMain.on(
)
: '',
onClick: e => {
appWindow.browserWindow.flashFrame(false);
appWindow.browserWindow.webContents.send(
ChatChannel.OpenRoom,
noti.roomSeq
@ -358,12 +359,15 @@ ipcMain.on(
e.close();
}
});
appWindow.browserWindow.flashFrame(true);
}
);
ipcMain.on(
NotificationChannel.CloseAllNotify,
(event: IpcMainEvent, ...args: any[]) => {
appWindow.browserWindow.flashFrame(false);
console.log('Channel.closeAllNotify', args);
}
);