working communication between renderer and main process
This commit is contained in:
@@ -43,9 +43,10 @@ const createWindow = (): void => {
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', createWindow);
|
||||
|
||||
app.whenReady().then(() => {
|
||||
app
|
||||
.whenReady()
|
||||
.then(createWindow)
|
||||
.then(() => {
|
||||
// dynamically changing the window bounds
|
||||
ipcMain.on(Channels.RESIZE_WINDOW, (event, req: DimensionChangeRequest) => {
|
||||
if (req.setAlwaysOnTop) {
|
||||
|
||||
@@ -63,7 +63,7 @@ export function ElectronProvider({ children }: { children: React.ReactNode }) {
|
||||
setIsWindowFocused(false);
|
||||
|
||||
// TODO: testing mode... uncomment both instructions below
|
||||
setDesktopMode('overlayOnly');
|
||||
// setDesktopMode('overlayOnly');
|
||||
});
|
||||
|
||||
window.electronAPI.on(Channels.ON_WINDOW_FOCUS, () => {
|
||||
|
||||
Reference in New Issue
Block a user