/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Helper class implementing XEmbed protocol handling routines(client side)
* Window which wants to participate in a protocol should create an instance,
* call install and forward all XClientMessageEvents to it.
*/
private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper");
private boolean active;
private boolean applicationActive;
super();
}
}
active = false;
}
}
}
void install() {
}
try {
} finally {
}
// XEmbeddedFrame is initially created with a null parent..
// Here it is reparented to the proper parent window.
if (parentWindow != 0) {
try {
0, 0);
} finally {
}
}
}
if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
active = true;
// Check if window is reparented. If not - it was created with
// parent and so we should update it here.
if (!embedded.isReparented()) {
embedded.setReparented(true);
}
break;
case XEMBED_WINDOW_ACTIVATE:
applicationActive = true;
break;
case XEMBED_WINDOW_DEACTIVATE:
if (applicationActive) {
applicationActive = false;
}
break;
case XEMBED_FOCUS_IN: // We got focus!
// Check for direction
break;
case XEMBED_FOCUS_OUT:
if (applicationActive) {
}
break;
}
}
}
if (embedded.focusAllowedFor()) {
}
switch(detail) {
case XEMBED_FOCUS_CURRENT:
// Do nothing - just restore to the current value
break;
case XEMBED_FOCUS_FIRST:
public void run() {
Component comp = ((Container)embedded.target).getFocusTraversalPolicy().getFirstComponent((Container)embedded.target);
}
}});
break;
case XEMBED_FOCUS_LAST:
public void run() {
Component comp = ((Container)embedded.target).getFocusTraversalPolicy().getLastComponent((Container)embedded.target);
}
}});
break;
}
}
case XConstants.ClientMessage:
break;
case XConstants.ReparentNotify:
break;
}
}
if (active) {
// unregister accelerators, etc. for old parent
// check if newParent is a root window
{
// reparenting to root means XEmbed termination
active = false;
} else {
// continue XEmbed with a new parent
}
}
}
boolean requestFocus() {
return true;
}
return false;
}
void handleWindowFocusOut() {
// fix for 6269309: it is possible that we call this method twice
// (for example, when receiving XEMBED_WINDOW_DEACTIVATE and then
// XEMBED_FOCUS_OUT client messages), so we first need to check if
// embedded is an active window before sending WINDOW_LOST_FOCUS
// to shared code
}
}
// Embedder is the parent of embedded.
}
boolean isApplicationActive() {
return applicationActive;
}
boolean isActive() {
return active;
}
void traverseOutForward() {
if (active) {
}
}
void traverseOutBackward() {
if (active) {
}
}
if (active) {
}
}
if (active) {
}
}
try {
} finally {
}
}
}
}