From 49aeeffbe63e9938695190899d2979b3f00ca666 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 3 May 2021 01:25:18 +0800 Subject: [PATCH] improve initial window size --- src/ui/remote.tis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/remote.tis b/src/ui/remote.tis index bb4d2d6c8..e712d2c7a 100644 --- a/src/ui/remote.tis +++ b/src/ui/remote.tis @@ -407,11 +407,11 @@ handler.adaptSize = function() { } } else { var w = handler.box(#width, #border) - if (sw == w) { + var h = handler.box(#height, #border) + if (w >= sw || h >= sh) { view.windowState = View.WINDOW_MAXIMIZED; return; } - var h = $(header).box(#height, #border); // extra for border var extra = 2; centerize(w + extra, handler.box(#height, #border) + h + extra);