src/java.desktop/unix/classes/sun/awt/X11/XMouseInfoPeer.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
*** 26,39 ****
package sun.awt.X11;
import java.awt.Point;
import java.awt.Window;
import java.awt.GraphicsEnvironment;
- import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.peer.MouseInfoPeer;
public class XMouseInfoPeer implements MouseInfoPeer {
/**
* Package-private constructor to prevent instantiation.
*/
--- 26,40 ----
package sun.awt.X11;
import java.awt.Point;
import java.awt.Window;
import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;
import java.awt.peer.MouseInfoPeer;
+ import sun.awt.AWTAccessor;
+
public class XMouseInfoPeer implements MouseInfoPeer {
/**
* Package-private constructor to prevent instantiation.
*/
*** 81,92 ****
long display = XToolkit.getDisplay();
// java.awt.Component.findUnderMouseInWindow checks that
// the peer is non-null by checking that the component
// is showing.
!
! long contentWindow = ((XWindow)w.getPeer()).getContentWindow();
long parent = XlibUtil.getParentWindow(contentWindow);
XToolkit.awtLock();
try
{
--- 82,93 ----
long display = XToolkit.getDisplay();
// java.awt.Component.findUnderMouseInWindow checks that
// the peer is non-null by checking that the component
// is showing.
! XWindow peer = AWTAccessor.getComponentAccessor().getPeer(w);
! long contentWindow = peer.getContentWindow();
long parent = XlibUtil.getParentWindow(contentWindow);
XToolkit.awtLock();
try
{