src/macosx/native/sun/awt/CRobot.m
Print this page
@@ -133,11 +133,11 @@
* Signature: (IIIIZZ)V
*/
JNIEXPORT void JNICALL
Java_sun_lwawt_macosx_CRobot_mouseEvent
(JNIEnv *env, jobject peer,
- jint screenIndex, jint mouseLastX, jint mouseLastY, jint buttonsState,
+ jint displayID, jint mouseLastX, jint mouseLastY, jint buttonsState,
jboolean isButtonsDownState, jboolean isMouseMove)
{
JNF_COCOA_ENTER(env);
// This is the native method called when Robot mouse events occur.
@@ -147,12 +147,10 @@
// the appropriate key modifier state, and whether the mouse action
// is simply a mouse move with no mouse button state changes.
CGError err = kCGErrorSuccess;
- CGDirectDisplayID displayID =
- FindCGDirectDisplayIDForScreenIndex(screenIndex);
CGRect globalDeviceBounds = CGDisplayBounds(displayID);
// Set unknown mouse location, if needed.
if ((mouseLastX == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN) ||
(mouseLastY == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN))