How to use the electron-util.activeWindow function in electron-util

To help you get started, we’ve selected a few electron-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atomiclabs / hyperdex / app / renderer / containers / App.js View on Github external
this.setState(prevState => {
			this.api.disableCurrency(coin);
			const enabledCoins = prevState.enabledCoins.filter(enabledCoin => enabledCoin !== coin);
			setCurrencies(prevState.portfolio.id, enabledCoins);

			// TODO: Remove this when https://github.com/artemii235/SuperNET/issues/459 is fixed.
			api.dialog.showMessageBox(activeWindow(), {
				message: 'Marketmaker v2 cannot currently disable currencies when running, so you need to restart HyperDEX for it to take effect.',
			});

			return {enabledCoins};
		}, () => {
			this.events.emit('enabled-currencies-changed');
github warrenbuckley / Compact-Log-Format-Viewer / LogViewer.Client / src / main / events.ts View on Github external
ipcMain.on("logviewer.open-file-dialog", () => {
    // arg is empty - we simply wanting to be notified that user trying to open a file dialog

    // Get focused window
    const currentWindow = activeWindow().webContents;
    openFileDialog(currentWindow);
});
github npezza93 / archipelago / app / renderer / traffic-lights.jsx View on Github external
    }} onClick={() => activeWindow().minimize()}>
      <div style="{{height:"></div>
github npezza93 / archipelago / app / renderer / traffic-lights.jsx View on Github external
      cursor: 'pointer'}} onClick={() => activeWindow().maximize()} />
  }
github npezza93 / archipelago / app / common / traffic-lights.js View on Github external
onClick() {
          return activeWindow().minimize()
        }
      },
github atomiclabs / hyperdex / app / renderer / views / TabView.js View on Github external
componentDidMount() {
		activeWindow().setSheetOffset(document.querySelector('.toolbar').getBoundingClientRect().height);
	}