Minimum and Maximum size become incorrect when the HiDPI factor changes #940
Labels
D - easy
Likely easier than most tasks here
DS - ios
DS - macos
DS - wayland
DS - x11
H - good first issue
Ideal for new contributors
H - help wanted
Someone please save us
P - normal
Great to have
On most platforms, the
set_min_inner_size
andset_max_inner_size
functions don't handle HiDPI factor changes properly.Most of the current implementations perform the coordinate-system conversion within the calls to
set_{whatever}_size
, and store the internal size bounds as either aPhysicalSize
or aLogicalSize
. That's almost the correct behavior, but it breaks when the window's HiDPI factor changes: ifset_{whatever}_size
had to do a coordinate system conversion from logical->physical or physical->logical, the size bound will no longer be accurate to what the user requested, since the coordinate system conversion will have changed. Winit should store theSize
parameter when one of those functions is called, and update the value passed to the OS whenever aHiDPIFactorChanged
event is received.The text was updated successfully, but these errors were encountered: