alacritty / alacritty/alacritty

Window flickering during resize

Ouverte
#7,898 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
65.7k
Forks
3.6k
Merge moyen
3 h 5 min
PR mergées (30 j)
3

Description

The client area of the window intermittently becomes transparent during resize, which causes flickering. See video. Possibly related to https://github.com/alacritty/alacritty/issues/969.

https://github.com/alacritty/alacritty/assets/107749/2479a89c-3ab2-4c31-8988-a523e838aea9

I explored some ways to fix the problem, but am uncertain on how to proceed. Any one of the following code changes fixes or strongly reduces flickering:
- Enable vsync by removing the call to `surface.set_swap_interval` in `alacritty/src/display/mod.rs`
- Sleep for 10 ms right after the call to `self.surface.resize` in `alacritty/src/display/mod.rs`
- Call `window_context.draw` during `WinitEvent::AboutToWait` instead of `WindowEvent::RedrawRequested` in `alacritty/src/event.rs`

Changing `.with_transparent(true)` to `.with_transparent(false)` in `alacritty/src/display/window.rs` helps a bit, since the window does not become transparent, bit it still flickers, exposing the system window color instead.

### System

OS: macOS 14.4.1
Version: alacritty 0.13.2 (bb8ea18), alacritty 0.14.0-dev (d4f2f857)

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.