#Sway / Wayland window resizing

5 messages · Page 1 of 1 (latest)

remote dune
#

I'm encountering issues getting Bevy to recognise window resizing on Sway (i didn't test it on any other wayland compositors)
It allows the resize, but the viewport doesn't change size to accomodate the changes.
Is this a bug or am I just missing something basic?

use bevy::prelude::*;

fn main() -> AppExit {
    App::new()
        .add_plugins(DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
                title: "SineWave".into(),
                fit_canvas_to_parent: true,
                prevent_default_event_handling: false,
                resizable: true,
                ..default()
            }),
            ..default()
        }))
        .run()
}
#

Logs:

2026-02-04T21:42:40.007147Z  INFO bevy_render::renderer: A
dapterInfo { name: "NVIDIA GeForce RTX 5070 Ti Laptop GPU"
, vendor: 4318, device: 12120, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "590.48.01", backend: Vulkan }
2026-02-04T21:42:40.267054Z  INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
2026-02-04T21:42:40.268093Z  INFO bevy_winit::system: Creating new window SineWave (0v0)
2026-02-04T21:43:14.803454Z  INFO bevy_window::system: No windows are open, exiting
2026-02-04T21:43:14.803642Z  INFO bevy_winit::system: Closing window 0v0
bevy r  68.93s user 31.35s system 284% cpu 35.294 total

don't really show anything, but include system info

hallow crystal
#

I'm pretty sure it worked on niri, but I don't think I had to set fit_canvas_to_parent (I avoid it generally, see its docs warning). Does it behave differently if set to false (the default) ?

#

I suspect the window resizing is working (the borders and decoration are resized), but it's the canvas (the rectangle with the gray clear color) that's not being properly resized. Which, it should be, but I doubt sway has anything to do with that ?

#

Would be interesting to know how this example behaves