src/solaris/classes/sun/awt/X11/XWindowPeer.java
Print this page
*** 225,248 ****
Window t_window = (Window)target;
Window owner = t_window.getOwner();
if (owner != null) {
ownerPeer = (XWindowPeer)owner.getPeer();
if (focusLog.isLoggable(PlatformLogger.FINER)) {
! focusLog.fine("Owner is " + owner);
! focusLog.fine("Owner peer is " + ownerPeer);
! focusLog.fine("Owner X window " + Long.toHexString(ownerPeer.getWindow()));
! focusLog.fine("Owner content X window " + Long.toHexString(ownerPeer.getContentWindow()));
}
// as owner window may be an embedded window, we must get a toplevel window
// to set as TRANSIENT_FOR hint
long ownerWindow = ownerPeer.getWindow();
if (ownerWindow != 0) {
XToolkit.awtLock();
try {
// Set WM_TRANSIENT_FOR
! if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
+ " for " + Long.toHexString(ownerWindow));
setToplevelTransientFor(this, ownerPeer, false, true);
// Set group leader
XWMHints hints = getWMHints();
hints.set_flags(hints.get_flags() | (int)XUtilConstants.WindowGroupHint);
--- 225,250 ----
Window t_window = (Window)target;
Window owner = t_window.getOwner();
if (owner != null) {
ownerPeer = (XWindowPeer)owner.getPeer();
if (focusLog.isLoggable(PlatformLogger.FINER)) {
! focusLog.finer("Owner is " + owner);
! focusLog.finer("Owner peer is " + ownerPeer);
! focusLog.finer("Owner X window " + Long.toHexString(ownerPeer.getWindow()));
! focusLog.finer("Owner content X window " + Long.toHexString(ownerPeer.getContentWindow()));
}
// as owner window may be an embedded window, we must get a toplevel window
// to set as TRANSIENT_FOR hint
long ownerWindow = ownerPeer.getWindow();
if (ownerWindow != 0) {
XToolkit.awtLock();
try {
// Set WM_TRANSIENT_FOR
! if (focusLog.isLoggable(PlatformLogger.FINE)) {
! focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
+ " for " + Long.toHexString(ownerWindow));
+ }
setToplevelTransientFor(this, ownerPeer, false, true);
// Set group leader
XWMHints hints = getWMHints();
hints.set_flags(hints.get_flags() | (int)XUtilConstants.WindowGroupHint);
*** 775,785 ****
protected void requestXFocus(long time, boolean timeProvided) {
// Since in XAWT focus is synthetic and all basic Windows are
// override_redirect all we can do is check whether our parent
// is active. If it is - we can freely synthesize focus transfer.
// Luckily, this logic is already implemented in requestWindowFocus.
! if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Requesting window focus");
requestWindowFocus(time, timeProvided);
}
public final boolean focusAllowedFor() {
if (isNativelyNonFocusableWindow()) {
--- 777,789 ----
protected void requestXFocus(long time, boolean timeProvided) {
// Since in XAWT focus is synthetic and all basic Windows are
// override_redirect all we can do is check whether our parent
// is active. If it is - we can freely synthesize focus transfer.
// Luckily, this logic is already implemented in requestWindowFocus.
! if (focusLog.isLoggable(PlatformLogger.FINE)) {
! focusLog.fine("Requesting window focus");
! }
requestWindowFocus(time, timeProvided);
}
public final boolean focusAllowedFor() {
if (isNativelyNonFocusableWindow()) {
*** 1898,1908 ****
}
}
@Override
public void xSetVisible(boolean visible) {
! if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
XToolkit.awtLock();
try {
this.visible = visible;
if (visible) {
applyWindowType();
--- 1902,1914 ----
}
}
@Override
public void xSetVisible(boolean visible) {
! if (log.isLoggable(PlatformLogger.FINE)) {
! log.fine("Setting visible on " + this + " to " + visible);
! }
XToolkit.awtLock();
try {
this.visible = visible;
if (visible) {
applyWindowType();