bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Call redraw while resizing windows

Open alice-i-cecile opened this issue 1 year ago • 3 comments

Would it be possible to call redraw while we're resizing, so window gets updated immediately, rather than just stretching until we're done?

Originally posted by @MiniaczQ in https://github.com/bevyengine/bevy/pull/15814#pullrequestreview-2364967936

alice-i-cecile avatar Oct 15 '24 02:10 alice-i-cecile

I think this should be configurable behavior, and I'd be fine with either being the default.

BenjaminBrienen avatar Oct 15 '24 03:10 BenjaminBrienen

I remember @raphlinus posting about this being a bit hairy on Windows some years back, though things may have improved since then.

Ref: https://github.com/rust-windowing/winit/issues/786

FWIW his issues were with doing it perfectly smoothly though, not with doing it at all.

mrec avatar Oct 15 '24 19:10 mrec

Yeah, especially as a configurable behavior I'm fine with a bit of jank vs not doing it at all. This is much less important for Bevy than for Raph's focus on traditional desktop apps.

alice-i-cecile avatar Oct 15 '24 19:10 alice-i-cecile

I think I'm in the right issue, I noticed that window resizes don't lag anymore… but now it stretches in a funny way. I just wanted to share a video:

https://github.com/user-attachments/assets/6c86fc69-5623-49db-b895-570c4d2ce33b

This case is worse though (wait until the end of the video), when the resize is triggered by doble-clicking on the title bar (macOS) there is a huge delay until it refreshes. In this case I'm not moving the cursor after the resize which, I think, makes it worse:

https://github.com/user-attachments/assets/b83cf288-5f1b-4bcb-98fb-e8b9220890eb

doup avatar Nov 16 '24 11:11 doup

It appears to be the discrepancy between layout engine and window stretching to fit

MiniaczQ avatar Nov 16 '24 12:11 MiniaczQ