7149913: [macosx] Deadlock in LWTextComponentPeer
authorserb
Thu, 05 Apr 2012 19:22:54 +0400
changeset 12398 8e4c529b8184
parent 12397 190dad37ff56
child 12399 6221283c619f
7149913: [macosx] Deadlock in LWTextComponentPeer Reviewed-by: anthony, art
jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Apr 05 19:01:43 2012 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Apr 05 19:22:54 2012 +0400
@@ -213,16 +213,8 @@
             SwingUtilities3.setDelegateRepaintManager(delegate, new RepaintManager() {
                 @Override
                 public void addDirtyRegion(final JComponent c, final int x, final int y, final int w, final int h) {
-                    if (SunToolkit.isDispatchThreadForAppContext(getTarget())) {
-                        synchronized (getDelegateLock()) {
-                            if (getDelegate().isPaintingForPrint()) {
-                                return;
-                            }
-                        }
-                    }
-                    Rectangle res = SwingUtilities.convertRectangle(
-                            c, new Rectangle(x, y, w, h), getDelegate());
-                    repaintPeer(res);
+                    repaintPeer(SwingUtilities.convertRectangle(
+                            c, new Rectangle(x, y, w, h), getDelegate()));
                 }
             });
         }