Skip to content

[KISS/SPoT] Separate magnifier rendering, target availability and timing policies #56

Description

@github-actions

Audit finding

MagnifierOverlay combines:

  • WinForms window/resource creation;
  • Magnification API initialization;
  • render/update timer;
  • geometry resolution;
  • target visibility/foreground policy;
  • native-menu association policy;
  • z-order policy;
  • transition grace state;
  • exclusion filters;
  • transient failure handling.

Runtime timing values are distributed across MagnifierOverlay, ForegroundWindowTracker, Win32MenuWindowTracker and SightAdaptContext (33, 75, 125, 5000 ms).

This makes render mechanics harder to test and gives timing relationships no single source of truth.

Target state

Extract:

  • a target-availability strategy for foreground windows versus transient popups;
  • a render/update component that performs positioning/source updates;
  • a central immutable runtime timing policy used by trackers, renderer and fault recovery.

Keep the Form responsible only for the native window/control lifetime and delegation.

Acceptance criteria

  • Foreground and popup availability rules are separate testable strategies.
  • Rendering/positioning logic can be exercised independently from the WinForms timer.
  • All runtime timing defaults live in one policy definition.
  • Relationships such as transition grace versus polling cadence are validated in one place.
  • No raw timing literals remain in runtime constructors.
  • Existing fast-switching, menu and destroyed-window behavior is preserved.
  • Multi-monitor and transient-popup positioning tests remain or are improved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions