Mouse events are scaled according to the highdpi setting. However if highdpi is set but the screen didn't support highdpi, the window is created without highdpi but the mouse events are still scaled. This part of the code will have to have some way of knowing that highdpi failed.