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

Print this page

        

*** 158,168 **** /** * Called after window creation, descendants should override to initialize Window * with class-specific values and perform post-initialization actions. */ void postInit(XCreateWindowParams params) { ! if (log.isLoggable(PlatformLogger.FINE)) { log.fine("WM name is " + getWMName()); } updateWMName(); // Set WM_CLIENT_LEADER property --- 158,168 ---- /** * Called after window creation, descendants should override to initialize Window * with class-specific values and perform post-initialization actions. */ void postInit(XCreateWindowParams params) { ! if (log.isLoggable(PlatformLogger.Level.FINE)) { log.fine("WM name is " + getWMName()); } updateWMName(); // Set WM_CLIENT_LEADER property
*** 360,370 **** if (bitGravity != null) { xattr.set_bit_gravity(bitGravity.intValue()); value_mask |= XConstants.CWBitGravity; } ! if (log.isLoggable(PlatformLogger.FINE)) { log.fine("Creating window for " + this + " with the following attributes: \n" + params); } window = XlibWrapper.XCreateWindow(XToolkit.getDisplay(), parentWindow.longValue(), bounds.x, bounds.y, // location --- 360,370 ---- if (bitGravity != null) { xattr.set_bit_gravity(bitGravity.intValue()); value_mask |= XConstants.CWBitGravity; } ! if (log.isLoggable(PlatformLogger.Level.FINE)) { log.fine("Creating window for " + this + " with the following attributes: \n" + params); } window = XlibWrapper.XCreateWindow(XToolkit.getDisplay(), parentWindow.longValue(), bounds.x, bounds.y, // location
*** 480,490 **** } return hints; } public void setSizeHints(long flags, int x, int y, int width, int height) { ! if (insLog.isLoggable(PlatformLogger.FINER)) { insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags)); } XToolkit.awtLock(); try { XSizeHints hints = getHints(); --- 480,490 ---- } return hints; } public void setSizeHints(long flags, int x, int y, int width, int height) { ! if (insLog.isLoggable(PlatformLogger.Level.FINER)) { insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags)); } XToolkit.awtLock(); try { XSizeHints hints = getHints();
*** 543,553 **** } } flags |= XUtilConstants.PWinGravity; hints.set_flags(flags); hints.set_win_gravity((int)XConstants.NorthWestGravity); ! if (insLog.isLoggable(PlatformLogger.FINER)) { insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) + ", values " + hints); } XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData); } finally { --- 543,553 ---- } } flags |= XUtilConstants.PWinGravity; hints.set_flags(flags); hints.set_win_gravity((int)XConstants.NorthWestGravity); ! if (insLog.isLoggable(PlatformLogger.Level.FINER)) { insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) + ", values " + hints); } XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData); } finally {
*** 597,607 **** } } public void xRequestFocus(long time) { XToolkit.awtLock(); try { ! if (focusLog.isLoggable(PlatformLogger.FINER)) { focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time); } XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time); } finally { XToolkit.awtUnlock(); --- 597,607 ---- } } public void xRequestFocus(long time) { XToolkit.awtLock(); try { ! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) { focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time); } XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time); } finally { XToolkit.awtUnlock();
*** 608,618 **** } } public void xRequestFocus() { XToolkit.awtLock(); try { ! if (focusLog.isLoggable(PlatformLogger.FINER)) { focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow())); } XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow()); } finally { XToolkit.awtUnlock(); --- 608,618 ---- } } public void xRequestFocus() { XToolkit.awtLock(); try { ! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) { focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow())); } XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow()); } finally { XToolkit.awtUnlock();
*** 627,637 **** XToolkit.awtUnlock(); } } public void xSetVisible(boolean visible) { ! if (log.isLoggable(PlatformLogger.FINE)) { log.fine("Setting visible on " + this + " to " + visible); } XToolkit.awtLock(); try { this.visible = visible; --- 627,637 ---- XToolkit.awtUnlock(); } } public void xSetVisible(boolean visible) { ! if (log.isLoggable(PlatformLogger.Level.FINE)) { log.fine("Setting visible on " + this + " to " + visible); } XToolkit.awtLock(); try { this.visible = visible;
*** 714,724 **** public void xSetBounds(int x, int y, int width, int height) { if (getWindow() == 0) { insLog.warning("Attempt to resize uncreated window"); throw new IllegalStateException("Attempt to resize uncreated window"); } ! if (insLog.isLoggable(PlatformLogger.FINE)) { insLog.fine("Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height); } width = Math.max(MIN_SIZE, width); height = Math.max(MIN_SIZE, height); XToolkit.awtLock(); --- 714,724 ---- public void xSetBounds(int x, int y, int width, int height) { if (getWindow() == 0) { insLog.warning("Attempt to resize uncreated window"); throw new IllegalStateException("Attempt to resize uncreated window"); } ! if (insLog.isLoggable(PlatformLogger.Level.FINE)) { insLog.fine("Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height); } width = Math.max(MIN_SIZE, width); height = Math.max(MIN_SIZE, height); XToolkit.awtLock();
*** 832,842 **** * We should always grab both keyboard and pointer to control event flow * on popups. This also simplifies synthetic grab implementation. * The active grab overrides activated automatic grab. */ public boolean grabInput() { ! if (grabLog.isLoggable(PlatformLogger.FINE)) { grabLog.fine("Grab input on {0}", this); } XToolkit.awtLock(); try { --- 832,842 ---- * We should always grab both keyboard and pointer to control event flow * on popups. This also simplifies synthetic grab implementation. * The active grab overrides activated automatic grab. */ public boolean grabInput() { ! if (grabLog.isLoggable(PlatformLogger.Level.FINE)) { grabLog.fine("Grab input on {0}", this); } XToolkit.awtLock(); try {
*** 897,907 **** static void ungrabInput() { XToolkit.awtLock(); try { XBaseWindow grabWindow = XAwtState.getGrabWindow(); ! if (grabLog.isLoggable(PlatformLogger.FINE)) { grabLog.fine("UnGrab input on {0}", grabWindow); } if (grabWindow != null) { grabWindow.ungrabInputImpl(); if (!XToolkit.getSunAwtDisableGrab()) { --- 897,907 ---- static void ungrabInput() { XToolkit.awtLock(); try { XBaseWindow grabWindow = XAwtState.getGrabWindow(); ! if (grabLog.isLoggable(PlatformLogger.Level.FINE)) { grabLog.fine("UnGrab input on {0}", grabWindow); } if (grabWindow != null) { grabWindow.ungrabInputImpl(); if (!XToolkit.getSunAwtDisableGrab()) {
*** 941,961 **** } public void handleUnmapNotifyEvent(XEvent xev) { mapped = false; } public void handleReparentNotifyEvent(XEvent xev) { ! if (eventLog.isLoggable(PlatformLogger.FINER)) { XReparentEvent msg = xev.get_xreparent(); eventLog.finer(msg.toString()); } } public void handlePropertyNotify(XEvent xev) { XPropertyEvent msg = xev.get_xproperty(); if (XPropertyCache.isCachingSupported()) { XPropertyCache.clearCache(window, XAtom.get(msg.get_atom())); } ! if (eventLog.isLoggable(PlatformLogger.FINER)) { eventLog.finer("{0}", msg); } } public void handleDestroyNotify(XEvent xev) { --- 941,961 ---- } public void handleUnmapNotifyEvent(XEvent xev) { mapped = false; } public void handleReparentNotifyEvent(XEvent xev) { ! if (eventLog.isLoggable(PlatformLogger.Level.FINER)) { XReparentEvent msg = xev.get_xreparent(); eventLog.finer(msg.toString()); } } public void handlePropertyNotify(XEvent xev) { XPropertyEvent msg = xev.get_xproperty(); if (XPropertyCache.isCachingSupported()) { XPropertyCache.clearCache(window, XAtom.get(msg.get_atom())); } ! if (eventLog.isLoggable(PlatformLogger.Level.FINER)) { eventLog.finer("{0}", msg); } } public void handleDestroyNotify(XEvent xev) {
*** 981,991 **** } } } public void handleClientMessage(XEvent xev) { ! if (eventLog.isLoggable(PlatformLogger.FINER)) { XClientMessageEvent msg = xev.get_xclient(); eventLog.finer(msg.toString()); } } --- 981,991 ---- } } } public void handleClientMessage(XEvent xev) { ! if (eventLog.isLoggable(PlatformLogger.Level.FINER)) { XClientMessageEvent msg = xev.get_xclient(); eventLog.finer(msg.toString()); } }
*** 1037,1047 **** } public void handleXCrossingEvent(XEvent xev) { } public void handleConfigureNotifyEvent(XEvent xev) { XConfigureEvent xe = xev.get_xconfigure(); ! if (insLog.isLoggable(PlatformLogger.FINER)) { insLog.finer("Configure, {0}", xe); } x = xe.get_x(); y = xe.get_y(); width = xe.get_width(); --- 1037,1047 ---- } public void handleXCrossingEvent(XEvent xev) { } public void handleConfigureNotifyEvent(XEvent xev) { XConfigureEvent xe = xev.get_xconfigure(); ! if (insLog.isLoggable(PlatformLogger.Level.FINER)) { insLog.finer("Configure, {0}", xe); } x = xe.get_x(); y = xe.get_y(); width = xe.get_width();
*** 1090,1100 **** target.dispatchEvent(ev); } } public void dispatchEvent(XEvent xev) { ! if (eventLog.isLoggable(PlatformLogger.FINEST)) { eventLog.finest(xev.toString()); } int type = xev.get_type(); if (isDisposed()) { --- 1090,1100 ---- target.dispatchEvent(ev); } } public void dispatchEvent(XEvent xev) { ! if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) { eventLog.finest(xev.toString()); } int type = xev.get_type(); if (isDisposed()) {