Wired quit keybinding and fullscreen toggle binding
This commit is contained in:
@@ -65,6 +65,8 @@ const loadProcessSignalHandlers = () => {
|
||||
}
|
||||
|
||||
const loadHandlers = () => {
|
||||
ipcMain.handle('quit', (eve) => app.quit());
|
||||
ipcMain.handle('toggleFullScreen', (eve) => { window.setFullScreen(!window.isFullScreen()); });
|
||||
ipcMain.handle('getLspConfigData', (eve) => newton.fs.getLspConfigData());
|
||||
ipcMain.handle('getFileContents', (eve, path) => newton.fs.getFileContents(path));
|
||||
ipcMain.handle('openFiles', (eve, startPath) => newton.fs.openFiles(startPath));
|
||||
@@ -109,4 +111,3 @@ app.on('window-all-closed', () => {
|
||||
app.quit()
|
||||
};
|
||||
});
|
||||
|
||||
|
@@ -9,6 +9,8 @@ contextBridge.exposeInMainWorld('electron', {
|
||||
|
||||
contextBridge.exposeInMainWorld('main', {
|
||||
onMenuActions: (callback) => ipcRenderer.on('menu-actions', (_event, action) => callback(action)),
|
||||
quit: () => ipcRenderer.invoke("quit"),
|
||||
toggleFullScreen: () => ipcRenderer.invoke("toggleFullScreen"),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('fs', {
|
||||
|
Reference in New Issue
Block a user