--- old/src/java.desktop/unix/classes/sun/awt/X11/XCustomCursor.java 2018-06-21 22:04:25.260092312 +0900 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XCustomCursor.java 2018-06-21 22:04:24.634105523 +0900 @@ -63,6 +63,10 @@ XlibWrapper.XQueryBestCursor(display,root_window, Math.abs(preferredWidth),Math.abs(preferredHeight),XlibWrapper.larg1,XlibWrapper.larg2); d = new Dimension(XlibWrapper.unsafe.getInt(XlibWrapper.larg1),XlibWrapper.unsafe.getInt(XlibWrapper.larg2)); + if ( preferredWidth > 0 && preferredHeight > 0 ) { + d.width = Math.min(d.width, preferredWidth); + d.height = Math.min(d.height, preferredHeight); + } } finally { XToolkit.awtUnlock();