Skip to content

fix: stabilize dock allocation after display wake - #345

Open
mihaly044 wants to merge 1 commit into
icedman:mainfrom
mihaly044:fix/display-wake-allocation-stability
Open

fix: stabilize dock allocation after display wake#345
mihaly044 wants to merge 1 commit into
icedman:mainfrom
mihaly044:fix/display-wake-allocation-stability

Conversation

@mihaly044

Copy link
Copy Markdown

Summary

  • defer animation for one frame when detached icon renderers are newly attached
  • compute and commit final dock geometry once per layout pass
  • avoid rewriting unchanged actor sizes, positions, and orientations
  • reject unallocated or non-finite Blur My Shell clip geometry

Problem

On GNOME 50 under Wayland, blanking and waking the display could leave the
animated dock in a persistent relayout loop. Hovering the dock then generated
large bursts of messages such as:

Can't update stage views actor d2daIcon [StIcon] because it needs an allocation
Can't update stage views actor dash [Gjs_ui_dash_Dash] because it needs an allocation
value "nan" of type 'gdouble' is invalid or out of range for property 'clip'

This manifested as unstable magnification and increased GNOME Shell load.

There were three contributing paths:

  1. Newly created renderer, dot, and badge actors were scaled and positioned in
    the same frame in which they were attached, before Clutter allocated them.
  2. layout() first assigned the dock the full monitor dimensions and then
    assigned its final dock dimensions on every animation frame. This
    continuously invalidated actor allocation even when the final geometry had
    not changed.
  3. The Blur My Shell integration could derive a clip from actors that were
    temporarily unallocated during display topology changes.

Changes

The renderer setup now queues relayout and waits one frame after adding new
actors. Dock geometry is calculated in local variables and committed once,
with unchanged properties left untouched. Blur clip updates now require valid
allocations, finite coordinates, and positive dimensions.

The new geometry remains monitor-relative and preserves the previous placement
for top, bottom, left, and right docks.

Validation

  • node --check animator.js
  • node --check dock.js
  • node --check integrations.js
  • git diff --check
  • glib-compile-schemas --strict --dry-run schemas
  • compared old and new geometry calculations across 36 combinations of dock
    position, monitor origin/resolution, and dock thickness
  • exercised repeated animation previews and real pointer hover on Fedora 44,
    GNOME Shell 50.3, Wayland; the repeated allocation-warning storm did not
    return and the Shell process remained stable

Scope

This PR is limited to generic allocation and display-wake stability. It does
not include downstream theme-specific magnification behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant