changeset 8243:01022f461570

7158311: GraphicsDevice.setDisplayMode(...) leads to hang when DISPLAY variable points to Oracle Linux 8001463: Regression : Deadlock between AWT-XAWT thread and AWT-EventQueue-0 Thread when screen resolution changes Reviewed-by: art, serb Contributed-by: alexander.zvegintsev@oracle.com
author pchelko
date Tue, 08 Oct 2013 15:17:22 +0400
parents bdc8abbce9c1
children a5d0730342a5
files src/solaris/classes/sun/awt/X11/XToolkit.java
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java	Tue Oct 08 13:57:44 2013 +0400
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java	Tue Oct 08 15:17:22 2013 +0400
@@ -240,9 +240,14 @@
                 @Override
                 public void dispatchEvent(XEvent ev) {
                     if (ev.get_type() == XConstants.ConfigureNotify) {
-                        ((X11GraphicsEnvironment)GraphicsEnvironment.
-                         getLocalGraphicsEnvironment()).
-                            displayChanged();
+                        awtUnlock();
+                        try {
+                            ((X11GraphicsEnvironment)GraphicsEnvironment.
+                             getLocalGraphicsEnvironment()).
+                                displayChanged();
+                        } finally {
+                            awtLock();
+                        }
                     }
                 }
             });