egui/crates
Max “Goldstein” Siling 853feea464
Fix incorrect window sizes for non-resizable windows on Wayland (#7103)
Using physical window sizes leads to all kinds of fun stuff: winit
always uses scale factor 1.0 on start to convert it back to logical
pixels and uses these logical pixels to set min/max size for
non-resizeable windows. You're supposed to adjust size after getting a
scale change event if you're using physical sizes, but adjusting min/max
sizes doesn't seem to work on sway, so the window is stuck with an
incorrect size.

The scale factor we guessed might also be wrong even if there's only a
single display since it doesn't take fractional scale into account.

TL;DR: winit actually wants logical sizes in these methods (since
Wayland in general operates mostly on logical sizes) and converting them
back and forth is lossy.

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* Closes https://github.com/emilk/egui/issues/7095
* [x] I have followed the instructions in the PR template

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-06-24 13:44:56 +02:00
..
ecolor Make `HSVA` derive serde (#7132) 2025-06-16 01:40:42 +02:00
eframe Fix incorrect window sizes for non-resizable windows on Wayland (#7103) 2025-06-24 13:44:56 +02:00
egui Use the new Popup api for the color picker button (#7137) 2025-06-18 19:19:05 +02:00
egui-wgpu Track original SVG size (#7098) 2025-05-28 08:33:01 +02:00
egui-winit Fix incorrect window sizes for non-resizable windows on Wayland (#7103) 2025-06-24 13:44:56 +02:00
egui_demo_app Create custom `egui_kittest::Node` (#7138) 2025-06-17 12:17:38 +02:00
egui_demo_lib Create custom `egui_kittest::Node` (#7138) 2025-06-17 12:17:38 +02:00
egui_extras egui_extras: Enable setting DatePickerButton start and end year explicitly (#7061) 2025-06-16 18:27:26 +02:00
egui_glow Track original SVG size (#7098) 2025-05-28 08:33:01 +02:00
egui_kittest Create custom `egui_kittest::Node` (#7138) 2025-06-17 12:17:38 +02:00
egui_plot Move `egui_plot` to its own repo (#4828) 2024-07-15 18:45:19 +02:00
egui_web Rename `master` branch to `main` (#7034) 2025-05-08 09:15:42 +02:00
emath Add Vec2::ONE 2025-06-15 18:01:58 -07:00
epaint Clamp text cursor positions in the same places where we used to (#7081) 2025-06-16 01:53:00 +02:00
epaint_default_fonts Update `emoji-icon-font` with fix for fullwidth latin characters (#7067) 2025-05-21 13:22:23 +02:00