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

Print this page

        

*** 295,306 **** case XKeyboardFocusManagerPeer.SNFH_FAILURE: return false; case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED: // Currently we just generate focus events like we deal with lightweight instead of calling // XSetInputFocus on native window ! if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Proceeding with request to " + lightweightChild + " in " + target); /** * The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight * checks that native window is focused while appropriate WINDOW_GAINED_FOCUS has not yet * been processed - it is in EventQueue. Thus, SNFH allows native request and stores request record * in requests list - and it breaks our requests sequence as first record on WGF should be the last --- 295,308 ---- case XKeyboardFocusManagerPeer.SNFH_FAILURE: return false; case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED: // Currently we just generate focus events like we deal with lightweight instead of calling // XSetInputFocus on native window ! if (focusLog.isLoggable(PlatformLogger.FINER)) { ! focusLog.finer("Proceeding with request to " + lightweightChild + " in " + target); + } /** * The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight * checks that native window is focused while appropriate WINDOW_GAINED_FOCUS has not yet * been processed - it is in EventQueue. Thus, SNFH allows native request and stores request record * in requests list - and it breaks our requests sequence as first record on WGF should be the last
*** 320,330 **** * when a component inside a Frame is requesting focus. * See 6314575 for details. */ boolean res = wpeer.requestWindowFocus(null); ! if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Requested window focus: " + res); // If parent window can be made focused and has been made focused(synchronously) // then we can proceed with children, otherwise we retreat. if (!(res && parentWindow.isFocused())) { return rejectFocusRequestHelper("Waiting for asynchronous processing of the request"); } --- 322,334 ---- * when a component inside a Frame is requesting focus. * See 6314575 for details. */ boolean res = wpeer.requestWindowFocus(null); ! if (focusLog.isLoggable(PlatformLogger.FINER)) { ! focusLog.finer("Requested window focus: " + res); ! } // If parent window can be made focused and has been made focused(synchronously) // then we can proceed with children, otherwise we retreat. if (!(res && parentWindow.isFocused())) { return rejectFocusRequestHelper("Waiting for asynchronous processing of the request"); }
*** 340,356 **** } return false; } private boolean rejectFocusRequestHelper(String logMsg) { ! if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(logMsg); XKeyboardFocusManagerPeer.removeLastFocusRequest(target); return false; } void handleJavaFocusEvent(AWTEvent e) { ! if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(e.toString()); if (e.getID() == FocusEvent.FOCUS_GAINED) { focusGained((FocusEvent)e); } else { focusLost((FocusEvent)e); } --- 344,364 ---- } return false; } private boolean rejectFocusRequestHelper(String logMsg) { ! if (focusLog.isLoggable(PlatformLogger.FINER)) { ! focusLog.finer(logMsg); ! } XKeyboardFocusManagerPeer.removeLastFocusRequest(target); return false; } void handleJavaFocusEvent(AWTEvent e) { ! if (focusLog.isLoggable(PlatformLogger.FINER)) { ! focusLog.finer(e.toString()); ! } if (e.getID() == FocusEvent.FOCUS_GAINED) { focusGained((FocusEvent)e); } else { focusLost((FocusEvent)e); }
*** 629,648 **** g.drawLine(x+1, y+height, x+width, y+height); // bottom g.drawLine(x+width, y+height, x+width, y+1); // right } public void setBackground(Color c) { ! if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set background to " + c); synchronized (getStateLock()) { background = c; } super.setBackground(c); repaint(); } public void setForeground(Color c) { ! if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set foreground to " + c); synchronized (getStateLock()) { foreground = c; } repaint(); } --- 637,660 ---- g.drawLine(x+1, y+height, x+width, y+height); // bottom g.drawLine(x+width, y+height, x+width, y+1); // right } public void setBackground(Color c) { ! if (log.isLoggable(PlatformLogger.FINE)) { ! log.fine("Set background to " + c); ! } synchronized (getStateLock()) { background = c; } super.setBackground(c); repaint(); } public void setForeground(Color c) { ! if (log.isLoggable(PlatformLogger.FINE)) { ! log.fine("Set foreground to " + c); ! } synchronized (getStateLock()) { foreground = c; } repaint(); }
*** 657,667 **** * @see java.awt.peer.ComponentPeer#getFontMetrics(Font) * @see Toolkit#getFontMetrics(Font) * @since JDK1.0 */ public FontMetrics getFontMetrics(Font font) { ! if (fontLog.isLoggable(PlatformLogger.FINE)) fontLog.fine("Getting font metrics for " + font); return sun.font.FontDesignMetrics.getMetrics(font); } public void setFont(Font f) { synchronized (getStateLock()) { --- 669,681 ---- * @see java.awt.peer.ComponentPeer#getFontMetrics(Font) * @see Toolkit#getFontMetrics(Font) * @since JDK1.0 */ public FontMetrics getFontMetrics(Font font) { ! if (fontLog.isLoggable(PlatformLogger.FINE)) { ! fontLog.fine("Getting font metrics for " + font); ! } return sun.font.FontDesignMetrics.getMetrics(font); } public void setFont(Font f) { synchronized (getStateLock()) {