patch 9.1.1834: MS-Windows: not possible to highlight the title bar

Problem:  MS-Windows: not possible to highlight the title bar
Solution: Make the title/caption bar configurable by introducing the
          'go-C' option value which allows to highlight it using the
          TitleBar and TitleBarNC highlighting groups (Mao-Yining).

Introduce titlebar color customization for Windows 11 GUI through
highlight groups and new 'guioptions' flag:

- Add 'C' flag to enable titlebar color customization (opt-in)
- New highlight groups: TitleBar (active) and TitleBarNC (inactive)
- Uses DWMWA_CAPTION_COLOR and DWMWA_TEXT_COLOR DWM attributes
- Dynamically loads dwmapi.dll for Windows 11 compatibility
- Defaults to system colors when set to NONE or feature disabled

closes: #18449

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Mao-Yining
2025-10-07 19:31:22 +00:00
committed by Christian Brabandt
parent f8b9251d8f
commit 2c09368273
16 changed files with 255 additions and 15 deletions

View File

@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Oct 05
*version9.txt* For Vim version 9.1. Last change: 2025 Oct 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -41715,6 +41715,8 @@ Options: ~
- Setting 'nowrap' in a modeline could cause long lines to be hidden
off-screen. To make this visible, the listchars "extend" suboption is set
to ">" by default, indicating text that extends beyond the window width.
- 'guioptions': New value |'go-C'| to style the title/caption bar on Windows 11
(see also the below platform specific change).
Ex commands: ~
- allow to specify a priority when defining a new sign |:sign-define|
@ -41750,6 +41752,8 @@ Plugins~
Platform specific ~
- MS-Winodws: Paths like "\Windows" and "/Windows" are now considered to be
absolute paths (to the current drive) and no longer relative.
- MS-Windows: The title bar follows the |hl-TitleBar| and |hl-TitleBarNC|
highlighting group |gui-w32-title-bar|.
- macOS: increase default scheduler priority to TASK_DEFAULT_APPLICATION.
Others: ~
@ -41841,6 +41845,8 @@ Highlighting: ~
|hl-TabPanel| |tabpanel|: not active tab page label
|hl-TabPanelFill| |tabpanel|: filler space
|hl-TabPanelSel| |tabpanel|: active tab page label
|hl-TitleBarNC| Configure the inactive title/bar on MS-Windows 11
|hl-TitleBar| Configure the active title/bar on MS-Windows 11
Commands: ~