< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java

Print this page

        

@@ -436,11 +436,11 @@
             XToolkit.removeFromWinMap(getWindow(), this);
             XlibWrapper.XDestroyWindow(XToolkit.getDisplay(), getWindow());
             if (XPropertyCache.isCachingSupported()) {
                 XPropertyCache.clearCache(window);
             }
-            window = -1;
+            window = 0;
             if( !isDisposed() ) {
                 setDisposed( true );
             }
 
             XAwtState.getGrabWindow(); // Magic - getGrabWindow clear state if grabbing window is disposed of.

@@ -724,10 +724,13 @@
     public void xSetBounds(Rectangle bounds) {
         xSetBounds(bounds.x, bounds.y, bounds.width, bounds.height);
     }
 
     public void xSetBounds(int x, int y, int width, int height) {
+        if (isDisposed()) {
+            return;
+        }
         if (getWindow() == 0) {
             insLog.warning("Attempt to resize uncreated window");
             throw new IllegalStateException("Attempt to resize uncreated window");
         }
         if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
< prev index next >