< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
Print this page
*** 4952,4969 ****
}
if (env->EnsureLocalCapacity(2) < 0) {
return;
}
jobject target = GetTarget(env);
DTRACE_PRINTLN("creating MWE in JNI");
jobject mouseWheelEvent = env->NewObject(mouseWheelEventCls,
mouseWheelEventConst,
target,
id, when, modifiers,
x+insets.left, y+insets.top,
! 0, 0,
clickCount, popupTrigger,
scrollType, scrollAmount,
roundedWheelRotation, preciseWheelRotation);
DASSERT(mouseWheelEvent != NULL);
--- 4952,4973 ----
}
if (env->EnsureLocalCapacity(2) < 0) {
return;
}
jobject target = GetTarget(env);
+ DWORD curMousePos = ::GetMessagePos();
+ int xAbs = GET_X_LPARAM(curMousePos);
+ int yAbs = GET_Y_LPARAM(curMousePos);
+
DTRACE_PRINTLN("creating MWE in JNI");
jobject mouseWheelEvent = env->NewObject(mouseWheelEventCls,
mouseWheelEventConst,
target,
id, when, modifiers,
x+insets.left, y+insets.top,
! xAbs, yAbs,
clickCount, popupTrigger,
scrollType, scrollAmount,
roundedWheelRotation, preciseWheelRotation);
DASSERT(mouseWheelEvent != NULL);
< prev index next >