< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
Print this page
@@ -73,29 +73,33 @@
public void handleMouseEvent(int eventType, int modifierFlags, double pluginX,
double pluginY, int buttonNumber, int clickCount) {
int x = (int)pluginX;
int y = (int)pluginY;
Point locationOnScreen = getLocationOnScreen();
- int screenX = locationOnScreen.x + x;
- int screenY = locationOnScreen.y + y;
+ int absX = locationOnScreen.x + x;
+ int absY = locationOnScreen.y + y;
if (eventType == CocoaConstants.NPCocoaEventMouseEntered) {
CCursorManager.nativeSetAllowsCursorSetInBackground(true);
} else if (eventType == CocoaConstants.NPCocoaEventMouseExited) {
CCursorManager.nativeSetAllowsCursorSetInBackground(false);
}
responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
- clickCount, x, y, screenX, screenY);
+ clickCount, x, y, absX, absY);
}
public void handleScrollEvent(double pluginX, double pluginY, int modifierFlags,
double deltaX, double deltaY, double deltaZ) {
int x = (int)pluginX;
int y = (int)pluginY;
+ Point locationOnScreen = getLocationOnScreen();
+ int absX = locationOnScreen.x + x;
+ int absY = locationOnScreen.y + y;
- responder.handleScrollEvent(x, y, modifierFlags, deltaX, deltaY);
+ responder.handleScrollEvent(x, y, absX, absY, modifierFlags, deltaX,
+ deltaY);
}
public void handleKeyEvent(int eventType, int modifierFlags, String characters,
String charsIgnoringMods, boolean isRepeat, short keyCode,
boolean needsKeyTyped) {
< prev index next >