Skip to content

fix: Update SystemThemeWatcher WndProc to listen to Windows theme changes#1677

Open
unchihugo wants to merge 1 commit intolepoco:mainfrom
unchihugo:main
Open

fix: Update SystemThemeWatcher WndProc to listen to Windows theme changes#1677
unchihugo wants to merge 1 commit intolepoco:mainfrom
unchihugo:main

Conversation

@unchihugo
Copy link
Copy Markdown

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently, WndProc in SystemThemeWatcher only listens to WM_DWMCOLORIZATIONCOLORCHANGED, WM_THEMECHANGED and WM_SYSCOLORCHANGE messages. These don't fire when theme changes happen through Windows Settings > Personalization > Colors > Choose your mode (Light/Dark).

The docs imply that ApplicationThemeManager.Changed triggers from "automatic updates", which I believe should include Windows theme changes as well.

Issue Number: #1656

What is the new behavior?

  1. Listens to WM_SETTINGCHANGE (Windows settings option changed) on top of currently established Windows Message conditions
  2. Conditional check to ensure that the "ImmersiveColorSet" lParam was provided (specifically theming that was changed)

@unchihugo unchihugo requested a review from pomianowski as a code owner March 21, 2026 23:45
@github-actions github-actions bot added themes Topic is related to managing themes PR Pull request dotnet release labels Mar 21, 2026
@unchihugo unchihugo changed the title Update SystemThemeWatcher WndProc to listen to Windows theme changes fix: Update SystemThemeWatcher WndProc to listen to Windows theme changes Mar 21, 2026
Copy link
Copy Markdown
Collaborator

@chucker chucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotnet PR Pull request release themes Topic is related to managing themes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants