Max “Goldstein” Siling
Max “Goldstein” Siling
Storing size and min/max size as specified and automatically adjusting logical size on scale factor updates as needed does seem like a more intuitive behaviour to me in general. For...
My intuition here is that if you specify your window size in physical pixels, you probably care about the buffer size and not the visual size — otherwise you would’ve...
> Then they want to use logical sizes all the way and this issue will go away. Yeah, I already wrote a patch to use logical sizes there; using physical...
I’ve experimented a bit more and I don’t think that’s a winit bug. I’ve adapted [wgpu’s “hello window” example](https://github.com/gfx-rs/wgpu/blob/8d3ade9e7f4cb39022a1fe5972f5966fc0cd7d91/examples/standalone/02_hello_window/src/main.rs) to create a non-resizeable fixed-logical-size window: A long code snippet ```rust...
Adding `dbg!(ctx.screen_rect(), ctx.zoom_factor())` into update function reveals that after resize attempt `screen_rect` size jumps to 400 (`zoom_factor` is always 1.0). I’ve played a bit with different scale factors: | Scale...
I added a debug print here https://github.com/emilk/egui/blob/da67465a6cd00e6c1732ecb96e0febc917d63c31/crates/eframe/src/native/wgpu_integration.rs#L783 and it gives a curious result: ``` got WindowEvent::Resized(PhysicalSize { width: 200, height: 200 } got WindowEvent::Resized(PhysicalSize { width: 400, height: 400 }...
I’ve traced it to this point: https://github.com/rust-windowing/winit/blob/9cbce055d35d1270e7e4cc43ba4c81fffa6d1bb9/src/platform_impl/linux/wayland/state.rs#L266-L273 Here we get a `WindowConfigure` with `new_size` set to 400:400, which is a logical size, which gets multiplied by scale factor 2 and...
The bug does not seem to reproduce on GNOME 48.2, so wl-roots or sway also might be part of the problem.
Okay, I figured it out. Here we guess scale by using primary monitors scale: https://github.com/emilk/egui/blob/92fea8a18fe6c102a6879347cbd599f3daf163aa/crates/egui-winit/src/lib.rs#L1585-L1594 It’s always an integer number because fractional scale protocol didn’t happened yet. We use it...
I think, it can be configured with options like this: ``` --warn-wrong-commands --assume-installed=%coreutils --assume-installed=curl ``` So you can configure which commands are available on target system.