Skip to content

[REGRESSION] macOS/metal window resize from top causes hangs #8043

@krisdigital

Description

@krisdigital

Describe the bug
I upgraded from 0.29 to 0.34 both using wgpu and noticed that resizing the top of the window causes hangs after the upgrade. I checked with a minimal app and the latest egui from the main branch - it depends on the window width and if resizing from the bottom (is smooth) or from the top (choppy).

Code I used to test:

use eframe::Frame;

use eframe::egui::{self};

struct App {}

impl App {
    fn new(_cc: &eframe::CreationContext) -> Self {
        App {}
    }
}

impl eframe::App for App {
    //fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {}
    fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut Frame) {
        ui.label("Hello");
    }
}

fn main() -> eframe::Result {
    let options = eframe::NativeOptions {
        persist_window: false,
        viewport: egui::ViewportBuilder::default().with_inner_size([800.0, 600.0]),
        renderer: eframe::Renderer::Wgpu,
        ..Default::default()
    };
    eframe::run_native(
        "egui-test",
        options,
        Box::new(|cc| Ok(Box::new(App::new(cc)))),
    )
}

To Reproduce
Steps to reproduce the behavior:

  1. Open a minimal app on macOS
  2. Resize the window to be full width
  3. Grab the upper side and resize
  4. Experience choppiness

Expected behavior
With 0.29 I could see that resize caused a little white flicker at the top, but otherwise it was smooth.

Screenshots

0.34

0_34_hang.mov

0.29

0_29_no_hang.mp4

Desktop (please complete the following information):

  • OS: macOS, M1/Metal
  • Version 15.7.4

Additional context
I tried profiling, I see the hangs in the profiler but I have no idea what could be the reason...

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions