# HG changeset patch # User pchelko # Date 1381231042 -14400 # Node ID a60499e6e1904748a44451123a0a0cb1029d2d98 # Parent 6f21caea5ba3a71fcb23f63827cd5d21af8177e0 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 diff -r 6f21caea5ba3 -r a60499e6e190 jdk/src/solaris/classes/sun/awt/X11/XToolkit.java --- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Tue Oct 08 13:57:44 2013 +0400 +++ b/jdk/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(); + } } } });