< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Cursor.cpp
Print this page
rev 60071 : 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: XXX
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, 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
@@ -473,12 +473,12 @@
::GetCursorPos(&p);
HMONITOR monitor = MonitorFromPoint(p, MONITOR_DEFAULTTOPRIMARY);
int screen = AwtWin32GraphicsDevice::GetScreenFromHMONITOR(monitor);
Devices::InstanceAccess devices;
AwtWin32GraphicsDevice *device = devices->GetDevice(screen);
- int x = (device == NULL) ? p.x : device->ScaleDownX(p.x);
- int y = (device == NULL) ? p.y : device->ScaleDownY(p.y);
+ int x = (device == NULL) ? p.x : device->ScaleDownAbsX(p.x);
+ int y = (device == NULL) ? p.y : device->ScaleDownAbsY(p.y);
env->SetIntField(point, AwtCursor::pointXID, x);
env->SetIntField(point, AwtCursor::pointYID, y);
CATCH_BAD_ALLOC;
}
< prev index next >