Examples of WWindowPeer


Examples of sun.awt.windows.WWindowPeer

                // the desktop properties dialog, for example), so
                // we need to record it every time prior to
                // entering the fullscreen mode.
                defaultDisplayMode = null;
            }
            WWindowPeer peer = (WWindowPeer)old.getPeer();
            if (peer != null) {
                synchronized(peer) {
                    peer.destroyBuffers();
                    exitFullScreenExclusive(isDDEnabledOnDevice(),
                                            screen, peer);
                }
            }
            /**
             * 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).
             */
            if (!(old instanceof Frame)) {
                Frame owner = getToplevelOwner(old);
                if (owner != null && ownerWindowedModeBounds != null) {
                    owner.setBounds(ownerWindowedModeBounds);
                }
                ownerWindowedModeBounds = null;
            }
        }
        super.setFullScreenWindow(w);
        if (w != null) {
            // always record the default display mode prior to going
            // fullscreen
            defaultDisplayMode = getDisplayMode();
            // Bug 4933099
            if (!(w instanceof Frame)) {
                Frame owner = getToplevelOwner(w);
                if (owner != null) {
                    ownerWindowedModeBounds = owner.getBounds();
                    // These will get set for the native window in
                    // any case.  Set them here so that resetting them
                    // later actually does the right thing
                    owner.setBounds(w.getBounds());
                }
            }
            // Enter full screen exclusive mode.
            WWindowPeer peer = (WWindowPeer)w.getPeer();
            synchronized(peer) {
                enterFullScreenExclusive(isDDEnabledOnDevice(),
                                         screen, peer);
                // Note: removed replaceSurfaceData() call because
                // changing the window size or making it visible
                // will cause this anyway, and both of these events happen
                // as part of switching into fullscreen mode.
            }

            // fix for 4868278
            peer.updateGC();
            peer.resetTargetGC();
        }
    }
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

        if (getDisplayMode().equals(dm)) {
            return;
        }
        Window w = getFullScreenWindow();
        if (w != null) {
            WWindowPeer peer = (WWindowPeer)w.getPeer();
            configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(),
                dm.getBitDepth(), dm.getRefreshRate());
            // resize the fullscreen window to the dimensions of the new
            // display mode
            Rectangle screenBounds = getDefaultConfiguration().getBounds();
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

        if (getDisplayMode().equals(dm)) {
            return;
        }
        Window w = getFullScreenWindow();
        if (w != null) {
            WWindowPeer peer = (WWindowPeer)w.getPeer();
            configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(),
                dm.getBitDepth(), dm.getRefreshRate());
            // resize the fullscreen window to the dimensions of the new
            // display mode
            Rectangle screenBounds = getDefaultConfiguration().getBounds();
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

                                                                 long hwnd);

    @Override
    protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
    {
        final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

        D3DRenderQueue rq = D3DRenderQueue.getInstance();
        rq.lock();
        try {
            rq.flushAndInvokeNow(new Runnable() {
                public void run() {
                    long hwnd = wpeer.getHWnd();
                    if (hwnd == 0l) {
                        // window is disposed
                        fsStatus = false;
                        return;
                    }
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

        // real toplevel to enter the full-screen mode with (4933099).
        if (!(w instanceof Frame) && !(w instanceof Dialog) &&
            (realFSWindow = getToplevelOwner(w)) != null)
        {
            ownerOrigBounds = realFSWindow.getBounds();
            WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

            ownerWasVisible = realFSWindow.isVisible();
            Rectangle r = w.getBounds();
            // we use operations on peer instead of component because calling
            // them on component will take the tree lock
            fp.reshape(r.x, r.y, r.width, r.height);
            fp.setVisible(true);
        } else {
            realFSWindow = w;
        }

        fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

         * 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).
         */
        WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
        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;
    }
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

            super.configDisplayMode(screen, w, width, height, bitDepth,
                                    refreshRate);
            return;
        }

        final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

        // REMIND: we do this before we switch the display mode, so
        // the dimensions may be exceeding the dimensions of the screen,
        // is this a problem?

        // update the bounds of the owner frame
        if (getFullScreenWindow() != realFSWindow) {
            Rectangle screenBounds = getDefaultConfiguration().getBounds();
            wpeer.reshape(screenBounds.x, screenBounds.y, width, height);
        }

        D3DRenderQueue rq = D3DRenderQueue.getInstance();
        rq.lock();
        try {
            rq.flushAndInvokeNow(new Runnable() {
                public void run() {
                    long hwnd = wpeer.getHWnd();
                    if (hwnd == 0l) {
                        // window is disposed
                        return;
                    }
                    // REMIND: do we really need a window here?
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

            return;
        }
        boolean flag = isDDEnabledOnDevice();
        if (flag && old != null) {
            // Enter windowed mode.
            WWindowPeer peer = (WWindowPeer)old.getPeer();
            if (peer != null) {
                synchronized(peer) {
                    peer.destroyBuffers();
                    exitFullScreenExclusive(screen, peer);
                }
            }
        }
        super.setFullScreenWindow(w);
        if (flag && w != null) {
            SecurityManager security = System.getSecurityManager();
            if (security != null) {
                if (fullScreenExclusivePermission == null) {
                    fullScreenExclusivePermission =
                        new AWTPermission("fullScreenExclusive");
                }
                security.checkPermission(fullScreenExclusivePermission);
            }
            // Enter full screen exclusive mode.
            WWindowPeer peer = (WWindowPeer)w.getPeer();
            synchronized(peer) {
                enterFullScreenExclusive(screen, peer);
                // Note: removed replaceSurfaceData() call because
                // changing the window size or making it visible
                // will cause this anyway, and both of these events happen
View Full Code Here

Examples of sun.awt.windows.WWindowPeer

            throw new IllegalArgumentException(
                "Invalid display mode");
        }
        Window w = getFullScreenWindow();
        if (w != null) {
            WWindowPeer peer = (WWindowPeer)w.getPeer();
            configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(),
                dm.getBitDepth(), dm.getRefreshRate());
            // Note: no call to replaceSurfaceData is required here since
            // replacement will be caused by an upcoming display change event
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.