src/java.desktop/unix/classes/sun/awt/X11/XInputMethod.java
Print this page
@@ -1,7 +1,7 @@
/*
- * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -29,10 +29,12 @@
import java.awt.Component;
import java.awt.Container;
import java.awt.Rectangle;
import java.awt.im.spi.InputMethodContext;
import java.awt.peer.ComponentPeer;
+
+import sun.awt.AWTAccessor;
import sun.awt.X11InputMethod;
import sun.util.logging.PlatformLogger;
/**
@@ -135,13 +137,14 @@
protected void awtUnlock() {
XToolkit.awtUnlock();
}
- @SuppressWarnings("deprecation")
long getCurrentParentWindow() {
- return ((XWindow)clientComponentWindow.getPeer()).getContentWindow();
+ XWindow peer = AWTAccessor.getComponentAccessor()
+ .getPeer(clientComponentWindow);
+ return peer.getContentWindow();
}
/*
* Native methods
*/