=== modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java' --- src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java 2016-04-12 16:24:51 +0000 +++ src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java 2016-04-18 11:29:43 +0000 @@ -53,7 +53,8 @@ ** 017 HC 20160407 Overhaul of window-activation logic. Removed setOverlayWindowLocation(), the ** method was unnecessary and was causing the COMBO-BOX drop-down location ** incorrect. -** 018 SBI 20160412 Added openURL(String path) to open the target page in the browser. +** 018 SBI 20160418 Added openURL(String path) to open the target page in the browser. Fixed +** maximal window's width and height values if they are not set by the server. */ package com.goldencode.p2j.ui.client.gui.driver.web; @@ -1368,13 +1369,25 @@ } WindowConfig wcfg = window.config(); + // get actual size + NativeDimension size = window.physicalDimension(); + + // if the actual size is greater than the configuration size, then let the maximal size be + // equal to its actual size. + int maxWidthPixels = Math.max(ConfigHelper.getMaxWidthPixels(wcfg), size.width); + + int maxHeightPixels = Math.max(ConfigHelper.getMaxHeightPixels(wcfg), size.height); + + int minWidthPixels = ConfigHelper.getMinWidthPixels(wcfg); + + int minHeightPixels = ConfigHelper.getMinHeightPixels(wcfg); websock.setResizeableWindow(ews.getWindowId(), wcfg.resize, - wcfg.minWidthPixels, - wcfg.minHeightPixels, - wcfg.maxWidthPixels, - wcfg.maxHeightPixels); + minWidthPixels, + minHeightPixels, + maxWidthPixels, + maxHeightPixels); } /**