src/windows/classes/sun/awt/windows/WWindowPeer.java
Print this page
*** 448,459 ****
* Returns all the ever active windows from the current AppContext.
* The list is sorted by the time of activation, so the latest
* active window is always at the end.
*/
@SuppressWarnings("unchecked")
! public static long[] getActiveWindowHandles() {
! AppContext appContext = AppContext.getAppContext();
synchronized (appContext) {
List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY);
if (l == null) {
return null;
}
--- 448,460 ----
* Returns all the ever active windows from the current AppContext.
* The list is sorted by the time of activation, so the latest
* active window is always at the end.
*/
@SuppressWarnings("unchecked")
! public static long[] getActiveWindowHandles(Component target) {
! AppContext appContext = SunToolkit.targetToAppContext(target);
! if (appContext == null) return null;
synchronized (appContext) {
List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY);
if (l == null) {
return null;
}