src/solaris/classes/sun/awt/X11/XIconWindow.java

Print this page

        

*** 59,69 **** try { AwtGraphicsConfigData adata = parent.getGraphicsConfigurationData(); final long screen = adata.get_awt_visInfo().get_screen(); final long display = XToolkit.getDisplay(); ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest(adata.toString()); } long status = XlibWrapper.XGetIconSizes(display, XToolkit.getDefaultRootWindow(), --- 59,69 ---- try { AwtGraphicsConfigData adata = parent.getGraphicsConfigurationData(); final long screen = adata.get_awt_visInfo().get_screen(); final long display = XToolkit.getDisplay(); ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest(adata.toString()); } long status = XlibWrapper.XGetIconSizes(display, XToolkit.getDefaultRootWindow(),
*** 71,87 **** if (status == 0) { return null; } int count = Native.getInt(XlibWrapper.iarg1); long sizes_ptr = Native.getLong(XlibWrapper.larg1); // XIconSize* ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("count = {1}, sizes_ptr = {0}", Long.valueOf(sizes_ptr), Integer.valueOf(count)); } XIconSize[] res = new XIconSize[count]; for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) { res[i] = new XIconSize(sizes_ptr); ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i)); } } return res; } finally { --- 71,87 ---- if (status == 0) { return null; } int count = Native.getInt(XlibWrapper.iarg1); long sizes_ptr = Native.getLong(XlibWrapper.larg1); // XIconSize* ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("count = {1}, sizes_ptr = {0}", Long.valueOf(sizes_ptr), Integer.valueOf(count)); } XIconSize[] res = new XIconSize[count]; for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) { res[i] = new XIconSize(sizes_ptr); ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i)); } } return res; } finally {
*** 96,106 **** log.finest("Returning ICE_WM icon size: 16x16"); return new Dimension(16, 16); } XIconSize[] sizeList = getIconSizes(); ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("Icon sizes: {0}", (Object[]) sizeList); } if (sizeList == null) { // No icon sizes so we simply fall back to 16x16 return new Dimension(16, 16); --- 96,106 ---- log.finest("Returning ICE_WM icon size: 16x16"); return new Dimension(16, 16); } XIconSize[] sizeList = getIconSizes(); ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("Icon sizes: {0}", (Object[]) sizeList); } if (sizeList == null) { // No icon sizes so we simply fall back to 16x16 return new Dimension(16, 16);
*** 145,159 **** saveHeight = closestHeight; dist = newDist; } } } ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("found=" + found); } if (!found) { ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("widthHint=" + widthHint + ", heightHint=" + heightHint + ", saveWidth=" + saveWidth + ", saveHeight=" + saveHeight + ", max_width=" + sizeList[0].get_max_width() + ", max_height=" + sizeList[0].get_max_height() + ", min_width=" + sizeList[0].get_min_width() --- 145,159 ---- saveHeight = closestHeight; dist = newDist; } } } ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("found=" + found); } if (!found) { ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("widthHint=" + widthHint + ", heightHint=" + heightHint + ", saveWidth=" + saveWidth + ", saveHeight=" + saveHeight + ", max_width=" + sizeList[0].get_max_width() + ", max_height=" + sizeList[0].get_max_height() + ", min_width=" + sizeList[0].get_min_width()
*** 165,175 **** { // Icon image too big /* determine which way to scale */ int wdiff = widthHint - sizeList[0].get_max_width(); int hdiff = heightHint - sizeList[0].get_max_height(); ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("wdiff=" + wdiff + ", hdiff=" + hdiff); } if (wdiff >= hdiff) { /* need to scale width more */ saveWidth = sizeList[0].get_max_width(); saveHeight = --- 165,175 ---- { // Icon image too big /* determine which way to scale */ int wdiff = widthHint - sizeList[0].get_max_width(); int hdiff = heightHint - sizeList[0].get_max_height(); ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("wdiff=" + wdiff + ", hdiff=" + hdiff); } if (wdiff >= hdiff) { /* need to scale width more */ saveWidth = sizeList[0].get_max_width(); saveHeight =
*** 197,207 **** XlibWrapper.XFree(sizeList[0].pData); } finally { XToolkit.awtUnlock(); } ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("return " + saveWidth + "x" + saveHeight); } return new Dimension(saveWidth, saveHeight); } --- 197,207 ---- XlibWrapper.XFree(sizeList[0].pData); } finally { XToolkit.awtUnlock(); } ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("return " + saveWidth + "x" + saveHeight); } return new Dimension(saveWidth, saveHeight); }
*** 424,434 **** min = image; } } } if (min != null) { ! if (log.isLoggable(PlatformLogger.FINER)) { log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null)); } setIconImage(min); } } --- 424,434 ---- min = image; } } } if (min != null) { ! if (log.isLoggable(PlatformLogger.Level.FINER)) { log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null)); } setIconImage(min); } }
*** 452,462 **** width = img.getWidth(null); height = img.getHeight(null); } Dimension iconSize = getIconSize(width, height); if (iconSize != null) { ! if (log.isLoggable(PlatformLogger.FINEST)) { log.finest("Icon size: {0}", iconSize); } iconWidth = iconSize.width; iconHeight = iconSize.height; } else { --- 452,462 ---- width = img.getWidth(null); height = img.getHeight(null); } Dimension iconSize = getIconSize(width, height); if (iconSize != null) { ! if (log.isLoggable(PlatformLogger.Level.FINEST)) { log.finest("Icon size: {0}", iconSize); } iconWidth = iconSize.width; iconHeight = iconSize.height; } else {