--- old/src/java.desktop/unix/classes/sun/awt/X11/XEmbedCanvasPeer.java 2015-09-11 00:11:28.513937900 +0300 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XEmbedCanvasPeer.java 2015-09-11 00:11:27.999335000 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -430,13 +430,10 @@ 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; - } + 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); }