Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-window-state

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-window-state - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

28

index.js

@@ -10,4 +10,4 @@ 'use strict';

module.exports = function (options) {
var app = electron.app;
var screen = electron.screen;
var app = electron.app || electron.remote.app;
var screen = electron.screen || electron.remote.screen;
var state;

@@ -77,13 +77,15 @@ var winRef;

}
var winBounds = win.getBounds();
if (isNormal(win)) {
state.x = winBounds.x;
state.y = winBounds.y;
state.width = winBounds.width;
state.height = winBounds.height;
}
state.isMaximized = win.isMaximized();
state.isFullScreen = win.isFullScreen();
state.displayBounds = screen.getDisplayMatching(winBounds).bounds;
// don't throw an error when window was closed
try {
var winBounds = win.getBounds();
if (isNormal(win)) {
state.x = winBounds.x;
state.y = winBounds.y;
state.width = winBounds.width;
state.height = winBounds.height;
}
state.isMaximized = win.isMaximized();
state.isFullScreen = win.isFullScreen();
state.displayBounds = screen.getDisplayMatching(winBounds).bounds;
} catch (err) {}
}

@@ -90,0 +92,0 @@

{
"name": "electron-window-state",
"version": "4.0.2",
"version": "4.1.0",
"description": "Simple module that helps to save and restore size and position of Electron windows.",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc