Skip to content

Commit

Permalink
Set delay when hiding window (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Jun 27, 2018
1 parent 84b4d53 commit 1b3ad4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ts/production-ipc-emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ import { ipcMain } from "electron";
import { IpcChannels } from "./ipc-channels";

export class ProductionIpcEmitter implements IpcEmitter {
private windowHideDelayInMilliSeconds = 50;

public emitResetUserInput(): void {
ipcMain.emit(IpcChannels.resetUserInput);
}

public emitHideWindow(): void {
ipcMain.emit(IpcChannels.hideWindow);

setTimeout((): void => {
ipcMain.emit(IpcChannels.hideWindow);
}, this.windowHideDelayInMilliSeconds); // set delay when hiding main window so user input can be reset properly
}
}

0 comments on commit 1b3ad4b

Please sign in to comment.