Skip to content

winit backed panics when creating window without fixed geometry #8926

@PonasKovas

Description

@PonasKovas

Bug Description

If in my window I only specify preferred-height without a min-height or height, it works fine on the default QT backend and in the preview, but crashes on startup on the winit backend.

[destroyed object]: error -1: invalid window geometry size (850x0)
Protocol error 4294967295 on object @0: 
Protocol error 4294967295 on object @0: 
Protocol error 4294967295 on object @0: 
Error: Attempting to create an OpenGL window surface with an invalid height: 0
Protocol error 4294967295 on object @0: 
Protocol error 4294967295 on object @0: 
...

Reproducible Code (if applicable)

export component Example inherits Window {
    preferred-height: 600px;
    // min-height: 100px; // uncommenting this makes it work

    HorizontalLayout {
        Rectangle {
            min-width: 550px;
            background: white;
        }
        Rectangle {
            min-width: 300px;
            background: gray;
        }
    }
}

Environment Details

  • Slint Version: 1.12.1
  • Platform/OS: Arch Linux
  • Programming Language: Rust
  • Backend/Renderer: Winit

Product Impact

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:backend-winitWinit backend (mS,mO)need triagingIssue that the owner of the area still need to triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions