﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
18694	Wrongly rendered cursors on HiDPI screen	johsin18	team	"==== What steps will reproduce the problem?
1. Start JOSM on a HiDPI screen (200% Windows scaling)
2. New Layer
3. Hover mouse over data layer and press Shift key (showing mouse cursor for ""add to selection"")

==== What is the expected result?
Mouse cursor with a dashed rectangle close to it, containing a little plus sign.  Mouse arrow and rectangle have approximately the same size.

==== What happens instead?
Mouse cursor with a dashed rectangle quite distant to it, containing a very tiny plus sign (very hard to see).  The mouse arrow is larger than the rectangle.

==== Please provide any additional information below. Attach a screenshot if possible.

See attached screenshots for both cases (imagine the hi DPI cursor scaled by half).  The behavior for other cursors with overlay is similar.
Disregard the few faulty pixel on the left in the high DPI mouse arrow.  They are caused by the Windows-built-in Magnifier tool somehow.

I would like to fix this myself.  However, I would need some explanations on the existing code.
Deep down in the cursor construction I get via
GuiSizesHelper.getSizeDpiAdjusted()
to 
GuiSizesHelper.getScreenDPI()
which claims to return the ""screen resolution in DPI"".
However, unless for the unlikely case that the user sets ""gui.scale"" in the settings manually, it will always return 96, regardless of the actual screen resolution (and/or scaling), will it not?
Is getScreenDPI() buggy or do I misinterpret its function?


{{{
Revision:15592
Is-Local-Build:true
Build-Date:2020-02-09 18:52:27

Identification: JOSM/1.5 (15592 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1909 (18363)
Memory Usage: 290 MB / 2028 MB (127 MB allocated, but free)
Java version: 15-ea+6-123, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: \Display0 3200x1800
Maximum Screen Size: 3200x1800
VM arguments: [-Djosm.home=<josm.pref>, -Didea.launcher.port=57345, -Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3\bin, -Dfile.encoding=UTF-8]
Program arguments: [--reset-preferences]
Dataset consistency test: No problems found

Last errors/warnings:
- W: Replacing existing preference file '<josm.pref>\preferences.xml' with default preference file.
- W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- W: No configuration settings found.  Using hardcoded default values for all pools.
}}}
"	defect	new	normal		Core	tested		template_report	
