Skip to content

Inactive window looks identical to focused — chrome should dim when the window loses key #49

Description

@amanfromsolan

Problem

When the Enso window isn't the key window, nothing in the app visually changes except the system drop shadow. Sidebar, header, tints, selection highlight — all render at full strength, so at a glance you can't tell whether the window has focus.

Native macOS apps dim their chrome when inactive: sidebar text and icons fade, selection turns grey, traffic lights lose their color. Enso should do the same.

Expected

When the window resigns key (and restores on becoming key):

  • Sidebar/chrome fades — text, icons, selection highlight drop to a dimmed/disabled strength, or an overall fade over the chrome.
  • Traffic lights grey out — they should show the native inactive treatment; worth verifying the custom titlebar handling (auto-hide alpha animation + the sidebar toggle pinned next to the zoom button in TerminalRootView.swift ~694) isn't interfering with AppKit's own inactive greying.

Notes

  • The app's colors come from custom Theme.ink / Theme.text opacities rather than semantic NSColors (like labelColor/selectedContentBackgroundColor) that auto-dim in inactive windows — which is why nothing responds today. Either observe key state (NSWindow.didBecomeKey/didResignKeyNotification, or SwiftUI's controlActiveState) and drive a dim factor through the theme, or move toward semantic colors where it's cheap.
  • TerminalRootView.swift already listens for didBecomeKeyNotification (~line 499) for other reasons, so there's a hook point nearby.
  • The terminal content itself can stay as-is (terminals conventionally keep their colors); it's the surrounding chrome that needs to respond.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions