svoid stefansOS_popInModule(Module m) ctex { swing(r { final JInternalFrame myFrame = cast getPossiblyInternalFrame(m.vis); if (myFrame == null) ret; JDesktopPane desktopPane = cast getParent(myFrame); if (desktopPane == main.desktop) ret; removeFromParent(myFrame); myFrame.updateUI(); myFrame.setMaximum(false); myFrame.setMaximizable(true); myFrame.setClosable(true); myFrame.setIconifiable(true); main.desktop.add(myFrame); //print("Layer: " + main.desktop.getLayer(myFrame)); Rectangle bounds = rectangleFromScreenToComponent(boundsOnScreen(getFrame(desktopPane)), main.desktop); //print("Setting bounds: " + bounds); if (bounds != null) myFrame.setBounds(bounds); fixInternalFrame(myFrame); myFrame.toFront(); myFrame.setSelected(true); print("Have bounds: " + getBounds(myFrame); disposeFrame(desktopPane); desktopPane = null; m.enhanceFrame(myFrame); // re-add title menus cset(m, poppedOut := false); vmBus_send modulePoppedIn(m, myFrame); }); }