< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XEmbedCanvasPeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 428,445 ****
void canvasFocusGained(FocusEvent e) {
if (isXEmbedActive()) {
xembedLog.fine("Forwarding FOCUS_GAINED");
int flavor = XEMBED_FOCUS_CURRENT;
! if (e instanceof CausedFocusEvent) {
! CausedFocusEvent ce = (CausedFocusEvent)e;
! if (ce.getCause() == CausedFocusEvent.Cause.TRAVERSAL_FORWARD) {
flavor = XEMBED_FOCUS_FIRST;
! } else if (ce.getCause() == CausedFocusEvent.Cause.TRAVERSAL_BACKWARD) {
flavor = XEMBED_FOCUS_LAST;
}
- }
xembed.sendMessage(xembed.handle, XEMBED_FOCUS_IN, flavor, 0, 0);
}
}
void canvasFocusLost(FocusEvent e) {
--- 428,442 ----
void canvasFocusGained(FocusEvent e) {
if (isXEmbedActive()) {
xembedLog.fine("Forwarding FOCUS_GAINED");
int flavor = XEMBED_FOCUS_CURRENT;
! if (e.getCause() == FocusEvent.Cause.TRAVERSAL_FORWARD) {
flavor = XEMBED_FOCUS_FIRST;
! } else if (e.getCause() == FocusEvent.Cause.TRAVERSAL_BACKWARD) {
flavor = XEMBED_FOCUS_LAST;
}
xembed.sendMessage(xembed.handle, XEMBED_FOCUS_IN, flavor, 0, 0);
}
}
void canvasFocusLost(FocusEvent e) {
< prev index next >