src/macosx/classes/sun/lwawt/LWWindowPeer.java

Print this page

        

*** 1057,1067 **** /* * Requests platform to set native focus on a frame/dialog. * In case of a simple window, triggers appropriate java focus change. */ public boolean requestWindowFocus(CausedFocusEvent.Cause cause) { ! if (focusLog.isLoggable(PlatformLogger.FINE)) { focusLog.fine("requesting native focus to " + this); } if (!focusAllowedFor()) { focusLog.fine("focus is not allowed"); --- 1057,1067 ---- /* * Requests platform to set native focus on a frame/dialog. * In case of a simple window, triggers appropriate java focus change. */ public boolean requestWindowFocus(CausedFocusEvent.Cause cause) { ! if (focusLog.isLoggable(PlatformLogger.Level.FINE)) { focusLog.fine("requesting native focus to " + this); } if (!focusAllowedFor()) { focusLog.fine("focus is not allowed");
*** 1083,1101 **** LWWindowPeer owner = getOwnerFrameDialog(this); // If owner is not natively active, request native // activation on it w/o sending events up to java. if (owner != null && !owner.platformWindow.isActive()) { ! if (focusLog.isLoggable(PlatformLogger.FINE)) { focusLog.fine("requesting native focus to the owner " + owner); } LWWindowPeer currentActivePeer = (currentActive != null ? (LWWindowPeer)currentActive.getPeer() : null); // Ensure the opposite is natively active and suppress sending events. if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) { ! if (focusLog.isLoggable(PlatformLogger.FINE)) { focusLog.fine("the opposite is " + currentActivePeer); } currentActivePeer.skipNextFocusChange = true; } owner.skipNextFocusChange = true; --- 1083,1101 ---- LWWindowPeer owner = getOwnerFrameDialog(this); // If owner is not natively active, request native // activation on it w/o sending events up to java. if (owner != null && !owner.platformWindow.isActive()) { ! if (focusLog.isLoggable(PlatformLogger.Level.FINE)) { focusLog.fine("requesting native focus to the owner " + owner); } LWWindowPeer currentActivePeer = (currentActive != null ? (LWWindowPeer)currentActive.getPeer() : null); // Ensure the opposite is natively active and suppress sending events. if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) { ! if (focusLog.isLoggable(PlatformLogger.Level.FINE)) { focusLog.fine("the opposite is " + currentActivePeer); } currentActivePeer.skipNextFocusChange = true; } owner.skipNextFocusChange = true;
*** 1148,1158 **** /* * Changes focused window on java level. */ protected void changeFocusedWindow(boolean becomesFocused, Window opposite) { ! if (focusLog.isLoggable(PlatformLogger.FINE)) { focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this); } if (skipNextFocusChange) { focusLog.fine("skipping focus change"); skipNextFocusChange = false; --- 1148,1158 ---- /* * Changes focused window on java level. */ protected void changeFocusedWindow(boolean becomesFocused, Window opposite) { ! if (focusLog.isLoggable(PlatformLogger.Level.FINE)) { focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this); } if (skipNextFocusChange) { focusLog.fine("skipping focus change"); skipNextFocusChange = false;
*** 1163,1173 **** return; } if (becomesFocused) { synchronized (getPeerTreeLock()) { if (blocker != null) { ! if (focusLog.isLoggable(PlatformLogger.FINEST)) { focusLog.finest("the window is blocked by " + blocker); } return; } } --- 1163,1173 ---- return; } if (becomesFocused) { synchronized (getPeerTreeLock()) { if (blocker != null) { ! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) { focusLog.finest("the window is blocked by " + blocker); } return; } }
*** 1177,1187 **** // - when the opposite (gaining focus) window is an owned/owner window. // - for a simple window in any case. if (!becomesFocused && (isGrabbing() || getOwnerFrameDialog(grabbingWindow) == this)) { ! if (focusLog.isLoggable(PlatformLogger.FINE)) { focusLog.fine("ungrabbing on " + grabbingWindow); } // ungrab a simple window if its owner looses activation. grabbingWindow.ungrab(); } --- 1177,1187 ---- // - when the opposite (gaining focus) window is an owned/owner window. // - for a simple window in any case. if (!becomesFocused && (isGrabbing() || getOwnerFrameDialog(grabbingWindow) == this)) { ! if (focusLog.isLoggable(PlatformLogger.Level.FINE)) { focusLog.fine("ungrabbing on " + grabbingWindow); } // ungrab a simple window if its owner looses activation. grabbingWindow.ungrab(); }