[MM 19649] Fix blank window when auto-starting the app on login (#1106)

* Windows: fix hidden/shown/maximized window on start

* allow for some overlap with the top/left edge of the screen before resetting

* support maximizing directly from app tray icon after initial startup

* inline comments

* alternative to prevent minimize effect on startup

* default hideOnStartup to false

* update comment
This commit is contained in:
Dean Whillier
2019-11-19 17:02:49 -05:00
committed by Guillermo Vayá
parent 395cbf9c9e
commit d23c8cf48a
3 changed files with 43 additions and 22 deletions

View File

@@ -8,6 +8,8 @@ const defaultOptions = {
stripUnknown: true,
};
const defaultMinWindowXPos = -100;
const defaultMinWindowYPos = -100;
const defaultWindowWidth = 1000;
const defaultWindowHeight = 700;
const minWindowWidth = 400;
@@ -23,8 +25,8 @@ const argsSchema = Joi.object({
});
const boundsInfoSchema = Joi.object({
x: Joi.number().integer().min(0),
y: Joi.number().integer().min(0),
x: Joi.number().integer().min(defaultMinWindowXPos).default(0),
y: Joi.number().integer().min(defaultMinWindowYPos).default(0),
width: Joi.number().integer().min(minWindowWidth).required().default(defaultWindowWidth),
height: Joi.number().integer().min(minWindowHeight).required().default(defaultWindowHeight),
maximized: Joi.boolean().default(false),