Skip to content

Allow move-only commands for fixed-size Windows windows #55

Description

@martinbha

Problem

The Windows adapter rejects every window without WS_THICKFRAME, including windows that can move but cannot resize.

WS_THICKFRAME indicates resize support; it does not mean the window is immovable. The current check prevents fixed-size dialogs and application windows from using move-only commands such as Center, Move Left, Move Right, Move Up, and Move Down.

The shared runtime intentionally lets each native adapter handle non-resizable windows, and the macOS adapter already preserves the allowed size while aligning constrained windows within the requested zone.

Proposed change

  • Do not reject a window solely because it lacks WS_THICKFRAME.
  • For move-only commands, preserve the current width and height and apply the requested position.
  • For layout commands that request a different size, preserve the actual fixed size and align it within the requested zone and destination work area.
  • Continue rejecting hidden, minimized, shell, child, and tool windows as appropriate.
  • Return the actual applied rectangle so history remains accurate.

Acceptance criteria

  • Center and directional Move commands work for movable fixed-size Windows windows.
  • Fixed-size windows remain within the destination work area.
  • Resizable windows retain their current behavior.
  • Tests cover move-only and tiling requests for a non-resizable window.
  • The Windows application target passes check and Clippy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindowsWindows platform adapter and integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions