Skip to content

Window ignoring resize request #3668

@dagit

Description

@dagit

Describe the bug

I was testing something against the current github/master (hash in case it helps with testing: 84a6d6f). I noticed that the code I have for resizing the window is not working against master (but works in 0.24.0).

To Reproduce

I resize the window when I load user config files (in my app, the window position and size are saved in different files, bypassing the built in persistence system):

if let (Some(x), Some(y), Some(width), Some(height)) = (x, y, width, height) {
    ctx.send_viewport_cmd(egui::viewport::ViewportCommand::InnerSize(
        egui::Vec2::new(width, height),
    ));
    ctx.send_viewport_cmd(egui::viewport::ViewportCommand::OuterPosition(
        egui::Pos2::new(x, y),
    ));
}

I run this code during eframe::App::update because the user can load a config file at any time.

Expected behavior

In 0.24.0 (the released version of 0.24 on crates), my window loads with the expected size and position but on the github version, it appears to be giving me the default window dimensions. It's certainly not the ones saved in my settings file.

Desktop (please complete the following information):

  • OS: Linux/x11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is brokenhelp wantedExtra attention is needednative-linuxProblem specific to Linuxviewportsmultiple viewports, viewports API

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions