Make sure caption controls "dim out" when window loses NC focus (WM_NCACTIVATE?) #16941

Closed
opened 2026-01-31 05:27:55 +00:00 by claunia · 10 comments
Owner

Originally created by @Poopooracoocoo on GitHub (Mar 6, 2022).

Windows Terminal version

1.13.10395.0

Windows build number

10.0.19044

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal
  2. Click outside of window to lose focus and make the window inactive

Expected Behavior

Current tab would go grey
Caption buttons would go grey

Actual Behavior

Neither titlebar element go grey

Originally created by @Poopooracoocoo on GitHub (Mar 6, 2022). ### Windows Terminal version 1.13.10395.0 ### Windows build number 10.0.19044 ### Other Software _No response_ ### Steps to reproduce 1. Open Windows Terminal 2. Click outside of window to lose focus and make the window inactive ### Expected Behavior Current tab would go grey Caption buttons would go grey ### Actual Behavior Neither titlebar element go grey
Author
Owner

@zadjii-msft commented on GitHub (Mar 7, 2022):

Generally, I've been duping these to #4862. However, I totally missed the one other checkbox in #1625 about the caption button colors, so I'm gonna re-purpose this issue to track that element. Thanks!

Note

Walkthrough

To do this, we'd need to:

  • Listen for a WM_NCACTIVATE in IslandWindow
  • Plumb that as an event up to AppHost
  • Call a new method on AppLogic, which plumbs that down to TerminalPage to tell them that the window was activated/inactivated
  • in TerminalPage, when _settings.GlobalSettings().ShowTabsInTitlebar() is true, call to MinMaxCloseControl in TitlebarControl to tell it the window is no longer active
  • There, change the color of the buttons when the window is activated/deactivated.

See also #10401, which never got finished.

@zadjii-msft commented on GitHub (Mar 7, 2022): Generally, I've been duping these to #4862. However, I totally missed the one other checkbox in #1625 about the caption button colors, so I'm gonna re-purpose this issue to track that element. Thanks! > **Note** > ## Walkthrough To do this, we'd need to: * Listen for a `WM_NCACTIVATE` in `IslandWindow` * Plumb that as an event up to `AppHost` * Call a new method on `AppLogic`, which plumbs that down to `TerminalPage` to tell them that the window was activated/inactivated * in `TerminalPage`, when `_settings.GlobalSettings().ShowTabsInTitlebar()` is true, call to `MinMaxCloseControl` in `TitlebarControl` to tell it the window is no longer active * There, change the color of the buttons when the window is activated/deactivated. See also #10401, which never got finished.
Author
Owner

@Poopooracoocoo commented on GitHub (Sep 14, 2022):

I'm psyched to see that #4862 was implemented. Is this still being worked on?

@Poopooracoocoo commented on GitHub (Sep 14, 2022): I'm psyched to see that #4862 was implemented. Is this still being worked on?
Author
Owner

@zadjii-msft commented on GitHub (Sep 14, 2022):

Is this still being worked on?

Not currently, but it seems fairly trivial these days. The plumbing in #4862 should make it trivial.

proposed "schema":

captionButtons: {
  foreground: ThemeColor,
  background: ThemeColor (default: #00000000),
  unfocusedForeground: ThemeColor,
  unfocusedBackground: ThemeColor (default: #00000000),
}

I don't really think we need to have separate knobs for each of the buttons.

@zadjii-msft commented on GitHub (Sep 14, 2022): > Is this still being worked on? Not currently, but it seems fairly trivial these days. The plumbing in #4862 should make it trivial. proposed "schema": ```js captionButtons: { foreground: ThemeColor, background: ThemeColor (default: #00000000), unfocusedForeground: ThemeColor, unfocusedBackground: ThemeColor (default: #00000000), } ``` I don't really think we need to have separate knobs for each of the buttons.
Author
Owner

@jamespack commented on GitHub (Jul 10, 2023):

I may take a stab at this one if that is ok.

@jamespack commented on GitHub (Jul 10, 2023): I may take a stab at this one if that is ok.
Author
Owner

@zadjii-msft commented on GitHub (Jul 10, 2023):

@jamespack Go for it!

@zadjii-msft commented on GitHub (Jul 10, 2023): @jamespack Go for it!
Author
Owner

@techy4shri commented on GitHub (Dec 25, 2024):

is this issue still being worked on?

@techy4shri commented on GitHub (Dec 25, 2024): is this issue still being worked on?
Author
Owner

@jamespack commented on GitHub (Dec 25, 2024):

I actually never started. Missed Mikes go ahead. @techy4shri if you are interested go at it 👍🏻 If I can find some free time I may still take a look though its not high on my wish list. Terminal as is today pretty much checks all my boxes 💯 🥇

@jamespack commented on GitHub (Dec 25, 2024): I actually never started. Missed Mikes go ahead. @techy4shri if you are interested go at it 👍🏻 If I can find some free time I may still take a look though its not high on my wish list. Terminal as is today pretty much checks all my boxes 💯 🥇
Author
Owner

@techy4shri commented on GitHub (Dec 25, 2024):

hmm it does, thanks @jamespack ! @zadjii-msft let me know if there's anything else I should know about :)

@techy4shri commented on GitHub (Dec 25, 2024): hmm it does, thanks @jamespack ! @zadjii-msft let me know if there's anything else I should know about :)
Author
Owner

@Abhii242004 commented on GitHub (Nov 8, 2025):

If this issue still not been resolved then I would like to work on it if you can assign it to me.

@Abhii242004 commented on GitHub (Nov 8, 2025): If this issue still not been resolved then I would like to work on it if you can assign it to me.
Author
Owner

@jamespack commented on GitHub (Nov 8, 2025):

If this issue still not been resolved then I would like to work on it if you can assign it to me.

@Abhii242004 they generally don't assign stuff. If it's still open it's up for grabs.

@jamespack commented on GitHub (Nov 8, 2025): > If this issue still not been resolved then I would like to work on it if you can assign it to me. @Abhii242004 they generally don't assign stuff. If it's still open it's up for grabs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16941