< prev index next >
src/java.desktop/windows/native/libawt/windows/MouseInfo.cpp
Print this page
rev 60071 : 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: XXX
*** 1,7 ****
/*
! * Copyright (c) 2003, 2017, 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
--- 1,7 ----
/*
! * Copyright (c) 2003, 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
*** 104,115 ****
xID = env->GetFieldID(pointClass, "x", "I");
CHECK_NULL_RETURN(xID, (jint)0);
yID = env->GetFieldID(pointClass, "y", "I");
CHECK_NULL_RETURN(yID, (jint)0);
! int x = (device == NULL) ? pt.x : device->ScaleDownX(pt.x);
! int y = (device == NULL) ? pt.y : device->ScaleDownY(pt.y);
env->SetIntField(point, xID, x);
env->SetIntField(point, yID, y);
// Always return 0 on Windows: we assume there's always a
--- 104,115 ----
xID = env->GetFieldID(pointClass, "x", "I");
CHECK_NULL_RETURN(xID, (jint)0);
yID = env->GetFieldID(pointClass, "y", "I");
CHECK_NULL_RETURN(yID, (jint)0);
! int x = (device == NULL) ? pt.x : device->ScaleDownAbsX(pt.x);
! int y = (device == NULL) ? pt.y : device->ScaleDownAbsY(pt.y);
env->SetIntField(point, xID, x);
env->SetIntField(point, yID, y);
// Always return 0 on Windows: we assume there's always a
< prev index next >