@Override
    protected void removeFSWindowListener(Window w) {
        realFSWindow.removeWindowListener(fsWindowListener);
        fsWindowListener = null;
        /**
         * Bug 4933099: There is some funny-business to deal with when this
         * method is called with a Window instead of a Frame.  See 4836744
         * for more information on this.  One side-effect of our workaround
         * for the problem is that the owning Frame of a Window may end
         * up getting resized during the fullscreen process.  When we
         * return from fullscreen mode, we should resize the Frame to
         * its original size (just like the Window is being resized
         * to its original size in GraphicsDevice).
         */
        final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
                                             .getPeer(realFSWindow);
        if (wpeer != null) {
            if (ownerOrigBounds != null) {
                // if the window went into fs mode before it was realized it
                // could have (0,0) dimensions
                if (ownerOrigBounds.width  == 0) ownerOrigBounds.width  = 1;
                if (ownerOrigBounds.height == 0) ownerOrigBounds.height = 1;
                wpeer.reshape(ownerOrigBounds.x,     ownerOrigBounds.y,
                              ownerOrigBounds.width, ownerOrigBounds.height);
                if (!ownerWasVisible) {
                    wpeer.setVisible(false);
                }
                ownerOrigBounds = null;
            }
            if (!fsWindowWasAlwaysOnTop) {
                wpeer.setAlwaysOnTop(false);
            }
        }
        realFSWindow = null;
    }
@Override
    protected void removeFSWindowListener(Window w) {
        realFSWindow.removeWindowListener(fsWindowListener);
        fsWindowListener = null;
       
        final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
                                             .getPeer(realFSWindow);
        if (wpeer != null) {
            if (ownerOrigBounds != null) {
               
               
                if (ownerOrigBounds.width  == 0) ownerOrigBounds.width  = 1;
                if (ownerOrigBounds.height == 0) ownerOrigBounds.height = 1;
                wpeer.reshape(ownerOrigBounds.x,     ownerOrigBounds.y,
                              ownerOrigBounds.width, ownerOrigBounds.height);
                if (!ownerWasVisible) {
                    wpeer.setVisible(false);
                }
                ownerOrigBounds = null;
            }
            if (!fsWindowWasAlwaysOnTop) {
                wpeer.setAlwaysOnTop(false);
            }
        }
        realFSWindow = null;
    }
@override protected void removefswindowlistener(window w) { realfswindow.removewindowlistener(fswindowlistener); fswindowlistener = null; final wwindowpeer wpeer = awtaccessor.getcomponentaccessor() .getpeer(realfswindow); if (wpeer != null) { if (ownerorigbounds != null) { if (ownerorigbounds.width == 0) ownerorigbounds.width = 1; if (ownerorigbounds.height == 0) ownerorigbounds.height = 1; wpeer.reshape(ownerorigbounds.x, ownerorigbounds.y, ownerorigbounds.width, ownerorigbounds.height); if (!ownerwasvisible) { wpeer.setvisible(false); } ownerorigbounds = null; } if (!fswindowwasalwaysontop) { wpeer.setalwaysontop(false); } } realfswindow = null; }