=== modified file 'src/com/goldencode/p2j/ui/client/gui/driver/AbstractGuiDriver.java' --- src/com/goldencode/p2j/ui/client/gui/driver/AbstractGuiDriver.java 2015-09-10 17:38:10 +0000 +++ src/com/goldencode/p2j/ui/client/gui/driver/AbstractGuiDriver.java 2015-09-14 18:19:50 +0000 @@ -1486,7 +1486,7 @@ } /** - * Iconify the window. + * Selects the target window and then minimizes it. * * @param sourceId * The root ID of the sub-tree which was iconified, and triggered iconification of @@ -1495,11 +1495,12 @@ @Override public void iconifyWindow(int sourceId) { + selectWindow(sourceId); ews.iconifyWindow(sourceId); } /** - * De-iconify the window. + * Selects the target window and then restores it. * * @param sourceId * The root ID of the sub-tree which was deiconified, and triggered restoration of @@ -1508,6 +1509,7 @@ @Override public void deiconifyWindow(int sourceId) { + selectWindow(sourceId); ews.deiconifyWindow(sourceId); } === modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java' --- src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java 2015-09-14 14:04:49 +0000 +++ src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java 2015-09-14 18:16:42 +0000 @@ -703,26 +703,6 @@ @Override public void windowIconified(int windowId, boolean state) { - //TODO remove it if it will work properly. -// System.err.println("windowIconified(" + windowId + ", " + state + ")"); -// List> windowsList = WindowManager.windowList(); -// boolean emptyScreen = true; -// for(TitledWindow win : windowsList) -// { -// System.err.println("windowId = " + win.getId().asInt() + " visible = " + win.isVisible()); -// if (win.isVisible()) -// { -// emptyScreen = false; -// break; -// } -// } -// System.err.println("current window = " + ((ews != null) ? ews.getWindowId(): "null")); -// if (emptyScreen) -// { -// System.err.println("empty screen for windowIconified(" + windowId + ", " + state + ")"); -// selectWindow(windowId); -// System.err.println("selected current window = " + ((ews != null) ? ews.getWindowId(): "null")); -// } if (state) { iconifyWindow(windowId); @@ -734,34 +714,6 @@ } /** - * Select the window and then iconify it. - * - * @param sourceId - * The root ID of the sub-tree which was iconified, and triggered iconification of - * this window. - */ - @Override - public void iconifyWindow(int sourceId) - { - selectWindow(sourceId); - super.iconifyWindow(sourceId); - } - - /** - * Select the window and then de-iconify the window. - * - * @param sourceId - * The root ID of the sub-tree which was deiconified, and triggered restoration of - * this window. - */ - @Override - public void deiconifyWindow(int sourceId) - { - selectWindow(sourceId); - super.deiconifyWindow(sourceId); - } - - /** * Register all the mouse-aware widgets (in all Windows) with the JS side. *

* To register a widget, it must be visible, displayed and enabled, and part of a visible