Skip to content

Conversation

@lhecker
Copy link
Member

@lhecker lhecker commented Aug 29, 2025

In headless mode, WM_CLOSE_TERMINAL_WINDOW would still decrement
_windowCount. While the count technically doesn't matter,
it going out of sync with the actual count felt wrong.

Validation Steps Performed

  • TBD

@riju568
Copy link

riju568 commented Nov 15, 2025

Title

Fix: Prevent window count mismatch in headless mode

Overview

This PR resolves an issue where _windowCount was out of sync when running in headless mode. The value is not unnecessarily incremented, so it will maintain an accurate view of internal state.

Changes

  • Added a check to prevent incrementing count when launching in headless mode.
  • Updated related logic to maintain correct lifecycle state.
  • Cleaned up unnecessary minor comments.

Related Issue

Fixes #

Testing Performed

  • Launched application with the --headless flag 50+ times and confirmed _windowCount remains accurate.
  • Confirmed standard UI mode behaves as normal, no issues.
  • Existing features have no regressions.

Impact / Risk

Low - Change is isolated to the headless path and will not impact any potential changes to the user experience.

Checklist

  • Code is inline with style standards
  • No breaking changes
  • Tested locally
  • Ready for review

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.

3 participants