mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
X11: WindowBuilder min/max size accounts for DPI (#729)
This commit is contained in:
parent
aabf0e13b7
commit
cb0a085968
|
@ -10,6 +10,7 @@
|
||||||
- Derive `Ord` and `PartialOrd` for `VirtualKeyCode` enum.
|
- Derive `Ord` and `PartialOrd` for `VirtualKeyCode` enum.
|
||||||
- On Windows, fix issue where hovering or dropping a non file item would create a panic.
|
- On Windows, fix issue where hovering or dropping a non file item would create a panic.
|
||||||
- On Wayland, fix resizing and DPI calculation when a `wl_output` is removed without sending a `leave` event to the `wl_surface`, such as disconnecting a monitor from a laptop.
|
- On Wayland, fix resizing and DPI calculation when a `wl_output` is removed without sending a `leave` event to the `wl_surface`, such as disconnecting a monitor from a laptop.
|
||||||
|
- On X11, `WindowBuilder::with_min_dimensions` and `WindowBuilder::with_max_dimensions` now correctly account for DPI.
|
||||||
|
|
||||||
# Version 0.18.0 (2018-11-07)
|
# Version 0.18.0 (2018-11-07)
|
||||||
|
|
||||||
|
|
|
@ -278,8 +278,10 @@ impl UnownedWindow {
|
||||||
|
|
||||||
// set size hints
|
// set size hints
|
||||||
{
|
{
|
||||||
let mut min_dimensions = window_attrs.min_dimensions;
|
let mut min_dimensions = window_attrs.min_dimensions
|
||||||
let mut max_dimensions = window_attrs.max_dimensions;
|
.map(|size| size.to_physical(dpi_factor));
|
||||||
|
let mut max_dimensions = window_attrs.max_dimensions
|
||||||
|
.map(|size| size.to_physical(dpi_factor));
|
||||||
if !window_attrs.resizable {
|
if !window_attrs.resizable {
|
||||||
if util::wm_name_is_one_of(&["Xfwm4"]) {
|
if util::wm_name_is_one_of(&["Xfwm4"]) {
|
||||||
warn!("To avoid a WM bug, disabling resizing has no effect on Xfwm4");
|
warn!("To avoid a WM bug, disabling resizing has no effect on Xfwm4");
|
||||||
|
|
Loading…
Reference in a new issue