<AWT Dev> [14]: [Windows] Deprecation warning about ID2D1Factory::GetDesktopDpi
Jorn Vernee
jorn.vernee at oracle.com
Tue Oct 22 13:11:07 UTC 2019
Hi,
I haven't seen an email on this list about the problem yet, so I'm
sending one :)
After updating to the latest version of Visual Studio 2017 (but
seemingly due to the latest Windows SDK update), I'm getting the
following deprecation warning when compiling:
h:/cygwin64/home/Jorn/cygwin-projects-new/foreign-abi/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp(96):
warning C4996: 'ID2D1Factory::GetDesktopDpi': Deprecated. Use
DisplayInformation::LogicalDpi for Windows Store Apps or GetDpiForWindow
for desktop apps.
c:\progra~2\wi3cf2~1\10\include\100183~1.0\um\d2d1.h(3355): note: see
declaration of 'ID2D1Factory::GetDesktopDpi'
Since warnings are treated as errors by default, it would be nice to
have this warning fixed to avoid having to pass
--disable-warnings-as-errors when configuring.
Trying to look into a fix a bit; It seems that this method for getting
the DPI can fail anyhow, maybe it should be removed at this point? Or
alternatively suppress deprecation warnings for this file?
Thanks,
Jorn
More information about the awt-dev
mailing list