From 71f4b4d71fa697489b1c3580c0945bef50ba9b75 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Sat, 20 Jul 2024 13:34:36 -0700 Subject: [PATCH] When setting size/position of app window make sure it's not an empty string --- src/gui/src/helpers/launch_app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/src/helpers/launch_app.js b/src/gui/src/helpers/launch_app.js index 607d9a30..940b6d0b 100644 --- a/src/gui/src/helpers/launch_app.js +++ b/src/gui/src/helpers/launch_app.js @@ -266,28 +266,28 @@ const launch_app = async (options)=>{ // width let window_width; - if(app_info.metadata?.window_size?.width !== undefined) + if(app_info.metadata?.window_size?.width !== undefined && app_info.metadata?.window_size?.width !== '') window_width = parseFloat(app_info.metadata.window_size.width); if(options.maximized) window_width = '100%'; // height let window_height; - if(app_info.metadata?.window_size?.height !== undefined){ + if(app_info.metadata?.window_size?.height !== undefined && app_info.metadata?.window_size?.height !== ''){ window_height = parseFloat(app_info.metadata.window_size.height); }if(options.maximized) window_height = `calc(100% - ${window.taskbar_height + window.toolbar_height + 1}px)`; // top let top; - if(app_info.metadata?.window_position?.top !== undefined) + if(app_info.metadata?.window_position?.top !== undefined && app_info.metadata?.window_position?.top !== '') top = parseFloat(app_info.metadata.window_position.top) + window.toolbar_height + 1; if(options.maximized) top = 0; // left let left; - if(app_info.metadata?.window_position?.left !== undefined) + if(app_info.metadata?.window_position?.left !== undefined && app_info.metadata?.window_position?.left !== '') left = parseFloat(app_info.metadata.window_position.left); if(options.maximized) left = 0;