summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-08-14 15:19:00 +0300
committerAndrej Mihajlov <and@mullvad.net>2019-08-16 15:21:07 +0300
commit0d1eaf2a466f0056c99c702c0ac9694c321360f2 (patch)
treef2c5ce73fc630c47f5afe32be783bfd4fd32e9b4 /gui/src/renderer
parent95af6cd0baf777978d9892c610fe2ee2a0974ebb (diff)
downloadmullvadvpn-0d1eaf2a466f0056c99c702c0ac9694c321360f2.tar.xz
mullvadvpn-0d1eaf2a466f0056c99c702c0ac9694c321360f2.zip
Add IPC handlers for window shape params
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index f4a3e052dc..7bee683701 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -22,7 +22,6 @@ import userInterfaceActions from './redux/userinterface/actions';
import versionActions from './redux/version/actions';
import { IAppUpgradeInfo, ICurrentAppVersionInfo } from '../main';
-import { IWindowShapeParameters } from '../main/window-controller';
import { cities, countries, loadTranslations, messages, relayLocations } from '../shared/gettext';
import { IGuiSettingsState } from '../shared/gui-settings-state';
import { IpcRendererEventChannel } from '../shared/ipc-event-channel';
@@ -84,21 +83,18 @@ export default class AppRenderer {
constructor() {
setupLogging(getRendererLogFile());
- ipcRenderer.on(
- 'update-window-shape',
- (_event: Electron.Event, shapeParams: IWindowShapeParameters) => {
- if (typeof shapeParams.arrowPosition === 'number') {
- this.reduxActions.userInterface.updateWindowArrowPosition(shapeParams.arrowPosition);
- }
- },
- );
-
ipcRenderer.on('window-shown', () => {
if (this.connectedToDaemon) {
this.updateAccountExpiry();
}
});
+ IpcRendererEventChannel.windowShape.listen((windowShapeParams) => {
+ if (typeof windowShapeParams.arrowPosition === 'number') {
+ this.reduxActions.userInterface.updateWindowArrowPosition(windowShapeParams.arrowPosition);
+ }
+ });
+
IpcRendererEventChannel.daemonConnected.listen(() => {
this.onDaemonConnected();
});