src/share/classes/javax/swing/DefaultDesktopManager.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 675,684 **** --- 675,689 ---- true); } f.setBounds(currentBounds); + if (!floaterCollision) { + Rectangle r = currentBounds; + currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height); + } + if(floaterCollision) { // since we couldn't blit we just redraw as fast as possible // the isDragging mucking is to avoid activating emergency // cleanup ((JInternalFrame)f).isDragging = false;
*** 704,726 **** }; // Fix the damage for (int i = 0; i < dirtyRects.length; i++) { parent.paintImmediately(dirtyRects[i]); } // new areas of blit were exposed if ( !(visBounds.equals(previousBounds)) ) { dirtyRects = SwingUtilities.computeDifference(previousBounds, desktopBounds); for (int i = 0; i < dirtyRects.length; i++) { dirtyRects[i].x += newX - previousBounds.x; dirtyRects[i].y += newY - previousBounds.y; ((JInternalFrame)f).isDragging = false; - parent.paintImmediately(dirtyRects[i]); ((JInternalFrame)f).isDragging = true; } } } finally { currentManager.endPaint(); --- 709,734 ---- }; // Fix the damage for (int i = 0; i < dirtyRects.length; i++) { parent.paintImmediately(dirtyRects[i]); + Rectangle r = dirtyRects[i]; + currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height); } // new areas of blit were exposed if ( !(visBounds.equals(previousBounds)) ) { dirtyRects = SwingUtilities.computeDifference(previousBounds, desktopBounds); for (int i = 0; i < dirtyRects.length; i++) { dirtyRects[i].x += newX - previousBounds.x; dirtyRects[i].y += newY - previousBounds.y; ((JInternalFrame)f).isDragging = false; parent.paintImmediately(dirtyRects[i]); ((JInternalFrame)f).isDragging = true; + Rectangle r = dirtyRects[i]; + currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height); } } } finally { currentManager.endPaint();