Skip to content

Apply wasVisible-guard for setGeometry(geom) to four more sites missed by #2603 #2646

Description

@ten9876

Background

PRs #2580 and #2635 (closing #2603) applied the if (wasVisible) setGeometry(geom) guard across most of the setFramelessMode(bool) implementations and frameless toggle sites. A complete grep of setGeometry(geom) call sites turned up four more sites with the same code-shape that were missed by both passes:

  1. src/gui/ConnectionPanel.cpp:669 — `ConnectionPanel::setFramelessMode`. Unguarded setGeometry(geom) immediately after setWindowFlags(flags).

  2. src/gui/AetherialAudioStrip.cpp:702 — `AetherialAudioStrip::setFramelessMode`. Same pattern.

  3. src/gui/containers/FloatingContainerWindow.cpp:163 — frameless flag toggle. Inline (no setFramelessMode method), same setGeometry(geom) after the Qt::FramelessWindowHint change without a wasVisible guard.

  4. src/gui/containers/FloatingContainerWindow.cpp:180 — always-on-top flag toggle. Same code-shape as the frameless toggle four lines above, different flag (Qt::WindowStaysOnTopHint). Both flag-toggle paths in this class have the bug.

Fix

Identical to PR #2580 / #2635: wrap each setGeometry(geom) in if (wasVisible) { setGeometry(geom); }. ~8 lines added across 2 files.

For the FloatingContainerWindow sites, fixing the always-on-top toggle is bundled with the frameless one because they share the exact same code-shape — saving the user pain when they toggle that flag from a cold-launched, never-shown floating container.

Verification

  • Build clean.
  • On macOS: open each affected window/container from a cold app launch. Pre-fix, expect top-left placement; post-fix, expect Qt's normal placement.
  • Runtime frameless / always-on-top toggle should still preserve geometry on already-visible windows.

Scope and risk

Anyone (including AetherClaude) can pick this up.

73, Jeremy KK7GWY & Claude (AI dev partner)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing feature

    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