src/macosx/classes/sun/lwawt/LWWindowPeer.java

Print this page

        

*** 110,119 **** --- 110,121 ---- private volatile boolean skipNextFocusChange; private static final Color nonOpaqueBackground = new Color(0, 0, 0, 0); + private volatile boolean textured; + /** * Current modal blocker or null. * * Synchronization: peerTreeLock. */
*** 440,452 **** @Override public void updateWindow() { } public final boolean isTranslucent() { synchronized (getStateLock()) { ! return !isOpaque || isShaped(); } } @Override final void applyShapeImpl(final Region shape) { --- 442,468 ---- @Override public void updateWindow() { } + public final boolean isTextured() { + return textured; + } + + public final void setTextured(final boolean isTextured) { + textured = isTextured; + } + public final boolean isTranslucent() { synchronized (getStateLock()) { ! /* ! * Textured window is a special case of translucent window. ! * The difference is only in nswindow background. So when we set ! * texture property our peer became fully translucent. It doesn't ! * fill background, create non opaque backbuffers and layer etc. ! */ ! return !isOpaque || isShaped() || isTextured(); } } @Override final void applyShapeImpl(final Region shape) {
*** 611,625 **** --- 627,643 ---- } if (isTranslucent()) { g.setColor(nonOpaqueBackground); g.fillRect(0, 0, w, h); } + if (!isTextured()) { if (g instanceof SunGraphics2D) { SG2DConstraint((SunGraphics2D) g, getRegion()); } g.setColor(getBackground()); g.fillRect(0, 0, w, h); + } } finally { g.dispose(); } } }
*** 980,991 **** --- 998,1011 ---- g.setColor(nonOpaqueBackground); g.fillRect(0, 0, r.width, r.height); if (g instanceof SunGraphics2D) { SG2DConstraint((SunGraphics2D) g, getRegion()); } + if (!isTextured()) { g.setColor(getBackground()); g.fillRect(0, 0, r.width, r.height); + } if (oldBB != null) { // Draw the old back buffer to the new one g.drawImage(oldBB, 0, 0, null); oldBB.flush(); }