emilk / emilk/egui

Scaling broke on Wayland (between version `0.24.1` and `0.25.0`): the window is twice the size it should be when the scaling factor is `2`

Open
#4,960 2 comments 1 reaction 0 assignees View on GitHub
egui-winit native-linux
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

When the scaling factor is `2` and I set the window size using `ViewportBuilder::with_inner_size()` in EGUI, the window ends up twice the size it should be (4 times the original amount of pixels). Things like images inside the window get scaled correctly

As far as I can tell the bug was introduced between these versions: https://github.com/emilk/egui/compare/0.24.1...0.25.0

![image](https://github.com/user-attachments/assets/1e143095-9b37-4ef5-97b0-365be4a024bf)

(the image and window should have the same size here)

This could also be an [`winit` bug](https://github.com/rust-windowing/winit/issues/3868), I don't know

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue on Wayland with a scaling factor of 2 and ViewportBuilder::with_inner_size(), comparing egui versions 0.24.1 and 0.25.0. Inspect the changes in that range and compare them with the linked winit issue; done means the window and its image have the same expected size at the affected scale.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.