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);