summaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java')
-rw-r--r--libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java b/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
index 7aea50991df..7407744af9e 100644
--- a/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
+++ b/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
@@ -60,17 +60,7 @@ public class GtkMouseInfoPeer implements MouseInfoPeer
public boolean isWindowUnderMouse(Window w)
{
- int[] coords = gde.getMouseCoordinates();
- GraphicsDevice[] gds = gde.getScreenDevices();
-
- // Check if the screen of the Window and the cursor match
- if( gds[ coords[0] ] != w.getGraphicsConfiguration().getDevice() )
- return false;
-
- // Return the bounds-check.
- Point p = w.getLocationOnScreen();
- return (coords[1] >= p.x && coords[1] < p.x + w.getWidth() &&
- coords[2] >= p.y && coords[2] < p.y + w.getHeight() );
- }
+ return gde.isWindowUnderMouse((GtkWindowPeer) w.getPeer());
+ }
}