Skip to content

Reapply dock geometry when screen work area changes #78

Description

@joryirving

Summary

Keep the dock correctly attached to its chosen edge when the usable screen area changes at runtime.

Current State

  • scripts/main.gd computes dock placement from DisplayServer.screen_get_usable_rect() inside apply_dock_position().
  • Edge snapping was added in Finish dock anchor layouts and snapping #14.
  • The dock now has better anchor behavior, but there is no explicit issue tracking reapplication of dock geometry when the display work area changes after startup.

Problem

Desktop conditions can change while the app is running:

  • display resolution changes
  • monitor arrangement changes
  • menu bar/dock/work-area changes
  • moving between displays with different usable rects

If dock geometry is only computed once, the window can end up offset, partially detached from the edge, or using stale placement assumptions.

Implementation Guidance

  • Work in scripts/main.gd
  • Reuse the existing geometry path rather than inventing a separate layout system:
  • Detect meaningful changes to the current usable screen rect and reapply dock geometry when needed
  • Preserve current anchor-family behavior and tile-first sizing
  • Avoid jitter or continuous reposition churn; only reapply when the underlying screen/work-area geometry actually changes

Acceptance Criteria

  • Bottom, left, and right anchors remain correctly attached after usable screen area changes
  • Moving to a display with different usable geometry does not leave the dock offset or detached
  • Reapplying geometry does not introduce visible jitter or constant repositioning
  • Existing edge-snapping and anchor behavior are preserved

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement.p2Normal priority

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions