jdk/src/share/classes/javax/swing/DefaultDesktopManager.java
changeset 23280 df31f522531f
parent 22567 5816a47fa4dd
child 23697 e556a715949f
equal deleted inserted replaced
23279:16c1ddb7b66a 23280:df31f522531f
   675                                       true);
   675                                       true);
   676           }
   676           }
   677 
   677 
   678           f.setBounds(currentBounds);
   678           f.setBounds(currentBounds);
   679 
   679 
       
   680           if (!floaterCollision) {
       
   681               Rectangle r = currentBounds;
       
   682               currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height);
       
   683           }
       
   684 
   680           if(floaterCollision) {
   685           if(floaterCollision) {
   681               // since we couldn't blit we just redraw as fast as possible
   686               // since we couldn't blit we just redraw as fast as possible
   682               // the isDragging mucking is to avoid activating emergency
   687               // the isDragging mucking is to avoid activating emergency
   683               // cleanup
   688               // cleanup
   684               ((JInternalFrame)f).isDragging = false;
   689               ((JInternalFrame)f).isDragging = false;
   704           };
   709           };
   705 
   710 
   706           // Fix the damage
   711           // Fix the damage
   707           for (int i = 0; i < dirtyRects.length; i++) {
   712           for (int i = 0; i < dirtyRects.length; i++) {
   708               parent.paintImmediately(dirtyRects[i]);
   713               parent.paintImmediately(dirtyRects[i]);
       
   714               Rectangle r = dirtyRects[i];
       
   715               currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height);
   709           }
   716           }
   710 
   717 
   711           // new areas of blit were exposed
   718           // new areas of blit were exposed
   712           if ( !(visBounds.equals(previousBounds)) ) {
   719           if ( !(visBounds.equals(previousBounds)) ) {
   713               dirtyRects = SwingUtilities.computeDifference(previousBounds,
   720               dirtyRects = SwingUtilities.computeDifference(previousBounds,
   714                                                             desktopBounds);
   721                                                             desktopBounds);
   715               for (int i = 0; i < dirtyRects.length; i++) {
   722               for (int i = 0; i < dirtyRects.length; i++) {
   716                   dirtyRects[i].x += newX - previousBounds.x;
   723                   dirtyRects[i].x += newX - previousBounds.x;
   717                   dirtyRects[i].y += newY - previousBounds.y;
   724                   dirtyRects[i].y += newY - previousBounds.y;
   718                   ((JInternalFrame)f).isDragging = false;
   725                   ((JInternalFrame)f).isDragging = false;
   719 
       
   720                   parent.paintImmediately(dirtyRects[i]);
   726                   parent.paintImmediately(dirtyRects[i]);
   721                   ((JInternalFrame)f).isDragging = true;
   727                   ((JInternalFrame)f).isDragging = true;
       
   728                   Rectangle r = dirtyRects[i];
       
   729                   currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height);
   722               }
   730               }
   723 
   731 
   724           }
   732           }
   725       } finally {
   733       } finally {
   726           currentManager.endPaint();
   734           currentManager.endPaint();