Skip to content

Application: Resizes that keep up on Windows and Linux #1375

Todo

Description

@oneo-me

Context

Part of #1306. The roadmap's Application and windows section lists this item (line 140 of docs/roadmap.md at f7fc2f5c) with no issue.

Reference: macOS's surface.resize

Acceptance

  • Dragging a window's edge on Windows shows each size laid out, with no stretched frame nor strip of background while the app keeps within 16 ms, as WM_SIZE waits for the commit and draws it, built and not yet run on Windows (2026-11-18); Linux's widget waits the same way at a size allocation, where its size goes to the engine without a wait and GTK draws the last layout at the new size

For: 开发@柚子

Activity

  1. added
    enhancement
    on Nov 21, 2026
  2. self-assigned this
    on Nov 22, 2026
  3. houko commented on Nov 23, 2026

    @houko
    Collaborator

    Windows and Linux resize paths are implemented, but the acceptance requires real drag-resize frame timing on both targets. Leaving open for native performance verification.

  4. self-assigned this
    on Nov 24, 2026
  5. oneo-me commented on Nov 24, 2026

    @oneo-me
    CollaboratorAuthor

    Live verification, 2026-11-24, on main at 96d8b4533. The checks are added in #2328.

    Windows 11 (build 26300, interactive console session, scale 1.0): passes. TestEdgeDragShowsEachSizeLaidOut drags the window's right edge with the system pointer (mouse_event) through the modal sizing loop, 400 px out and back in 10 px steps. It reads the composed screen three times per step. The app takes 12 ms to style each size, which is within the 16 ms wait.

    • With the shipped resizeWait: 3 of 3 runs, 0 of 240 samples showed a stretched frame or the window's background.
    • With resizeWait cut to 1 ns: 3 of 3 runs failed, with 38 to 40 samples showing background.
    • With a 40 ms app (past the bound): about 117 bad samples either way, so the check does see these frames.
    • DWM can still show the window at its previous extent for one composition, with the new layout clipped. This is neither stretched nor background.

    Linux, Hyprland 0.56 (Wayland): fails. TestCompositorResizeShowsEachSizeLaidOut steps a floating window's width through Hyprland's dispatchers, with animations off, and reads one screen row with grim. Temporary logging in window.resize showed every allocation got its commit within the wait (about 12.2 ms, no timeouts). The views' frames were correct afterwards. Even so, the compositor kept showing the previous size's layout at the new size, with the last view stretched to the edge, for tens of milliseconds:

    App time per size Bad samples (of 160)
    0 ms 1
    4 ms 77
    8 ms 156
    12 ms 156 to 159
    12 ms, resizeWait = 100 ms 159

    So the wait works, but GTK presents a frame with the old child allocations before it draws the applied layout. One possibility is that queue_allocate from the batch, called inside size_allocate, defers child placement to the next frame clock cycle. This still needs a fix.

    Still open:

    • The Linux/Wayland fix above.
    • X11 window managers (GNOME on Xorg, KDE on X11), which I don't have.

    🤖 Claude Opus 5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions