AutoDarkMode / Windows-Auto-Night-Mode

Automatically switches between the dark and light theme of Windows 10 and Windows 11
GNU General Public License v3.0
7.54k stars 266 forks source link

Toggling theme changes desktop background colour even though not configured #828

Closed AndreasBackx closed 8 months ago

AndreasBackx commented 8 months ago

Description

When themes are changed from dark -> light or light -> dark, it changes the background colour I am using from what I set (black) to the Sky blue colour.

Changing the theme via Windows does not have this effect.

Expected Behavior

For it to not change my background colour as I've not enabled such functionality.

Log Data

2024-03-13 11:12:58 | Info | Program.Main: commit hash: cf7a0fe, build: 10.4.1.1 
2024-03-13 11:12:58 | Info | Program.Main: cwd: C:\Users\andre\AppData\Local\Programs\AutoDarkMode\adm-app\AutoDarkModeSvc.exe 
2024-03-13 11:12:59 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\andre\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2024-03-13 11:12:59 | Info | AsyncPipeServer.Loop: started npipe server with 5 workers (single in, multi out), request: admpipe_request_andreas 
2024-03-13 11:12:59 | Info | ComponentManager..ctor: current windows build: 22631.3155 
2024-03-13 11:12:59 | Info | ComponentManager..ctor: using apps and system components for newer builds 19044 and up 
2024-03-13 11:12:59 | Info | ComponentManager..ctor: using wallpaper component for windows builds 22621.1105 and up 
2024-03-13 11:12:59 | Info | ComponentManager..ctor: using colorization and cursor switcher for newer builds 19044 and up 
2024-03-13 11:12:59 | Info | MessageParser.Parse: signal received: request for running status 
2024-03-13 11:12:59 | Info | SystemEventHandler.RegisterResumeEvent: enabling theme refresh at system unlock (win 11) 
2024-03-13 11:12:59 | Info | MessageParser.Parse: signal received: add service to autostart 
2024-03-13 11:13:03 | Info | TimeSwitchGovernor.EnableHook: time switch governor selected 
2024-03-13 11:13:04 | Info | NightLightGovernor.EnableHook: night light governor selected 
2024-03-13 11:13:04 | Info | NightLightGovernor.UpdateNightLightState: night light status enabled changed to False 
2024-03-13 11:13:17 | Info | MessageParser.Parse: signal received: current colorization 
2024-03-13 11:13:19 | Info | MessageParser.Parse: signal received: detecting new monitors 
2024-03-13 11:13:19 | Info | DisplayHandler.DetectMonitors: missing monitor found, adding new default config for: \\?\DISPLAY#LEN66F9#7&289ec95a&0&UID260#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} 
2024-03-13 11:13:19 | Info | DisplayHandler.DetectMonitors: missing monitor found, adding new default config for: \\?\DISPLAY#DELA245#7&289ec95a&0&UID256#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} 
2024-03-13 11:13:19 | Info | DisplayHandler.DetectMonitors: missing monitor found, adding new default config for: \\?\DISPLAY#LEN66F9#7&289ec95a&0&UID264#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} 
2024-03-13 11:13:19 | Info | DisplayHandler.DetectMonitors: missing monitor found, adding new default config for: \\?\DISPLAY#GSMC0A0#7&289ec95a&0&UID268#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} 
2024-03-13 11:13:20 | Info | MessageParser.Parse: signal received: get requested theme 
2024-03-13 11:13:22 | Info | MessageParser.Parse: signal received: get requested theme 
2024-03-13 11:13:35 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, SystemSwitchThemeFile] 
2024-03-13 11:13:35 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\andre\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2024-03-13 11:13:35 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2024-03-13 11:13:35 | Info | SystemSwitchThemeFile.SwitchSystemTheme: update info - previous: Light/NoAccent, pending: Dark/NoAccent, mode: Switch, accent: no 
2024-03-13 11:13:35 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2024-03-13 11:13:35 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\andre\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2024-03-13 11:13:35 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2024-03-13 11:13:35 | Info | Service.ToggleTheme: ui signal received: theme toggle: switching to dark theme 
2024-03-13 11:13:51 | Info | PostponeManager.Remove: postpone queue cleared 
2024-03-13 11:13:51 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, SystemSwitchThemeFile] 
2024-03-13 11:13:52 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\andre\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2024-03-13 11:13:52 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2024-03-13 11:13:52 | Info | SystemSwitchThemeFile.SwitchSystemTheme: update info - previous: Dark/NoAccent, pending: Light/NoAccent, mode: Switch, accent: no 
2024-03-13 11:13:52 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2024-03-13 11:13:52 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\andre\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2024-03-13 11:13:52 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2024-03-13 11:13:52 | Info | Service.ToggleTheme: ui signal received: theme toggle: switching to light theme 
AutoThemeSwitchingEnabled: true
Governor: NightLight
Autostart:
  Validate: true
WindowsThemeMode:
  Enabled: false
  DarkThemePath: 
  LightThemePath: 
  MonitorActiveTheme: false
  ApplyFlags: []
AppsSwitch:
  Enabled: true
  Component:
    Mode: Switch
SystemSwitch:
  Enabled: true
  Component:
    Mode: Switch
    TaskbarSwitchDelay: 1200
    TaskbarColorOnAdaptive: false
    TaskbarColorWhenNonAdaptive: Light
    DWMPrevalenceSwitch: false
    DWMPrevalenceEnableTheme: Light
TouchKeyboardSwitch:
  Enabled: false
  Component: {}
ColorizationSwitch:
  Enabled: false
  Component:
    LightHex: '#FFCA5010'
    DarkHex: '#FFCA5010'
    LightAutoColorization: false
    DarkAutoColorization: false
ColorFilterSwitch:
  Enabled: false
  Component: {}
OfficeSwitch:
  Enabled: false
  Component:
    Mode: Switch
    LightTheme: 0
    DarkTheme: 4
CursorSwitch:
  Enabled: false
  Component:
    CursorsLight: 
    CursorsDark: 
Sunrise: 2024-03-13T07:00:00.0000000
Sunset: 2024-03-13T20:00:00.0000000
Location:
  PollingCooldownTimeSpan: 1.00:00:00
  Enabled: false
  UseGeolocatorService: true
  SunsetOffsetMin: 0
  SunriseOffsetMin: 0
  CustomLat: 0
  CustomLon: 0
Tunable:
  BatterySliderDefaultValue: 25
  DisableEnergySaverOnThemeSwitch: false
  UseLogonTask: false
  Debug: false
  Trace: false
  DebugTimerMessage: false
  ShowTrayIcon: true
  AlwaysFullDwmRefresh: false
  UICulture: en
GPUMonitoring:
  Enabled: false
  Threshold: 30
  Samples: 1
ProcessBlockList:
  ProcessNames: []
  Enabled: false
Events:
  DarkThemeOnBattery: false
  Win10AllowLockscreenSwitch: false
Notifications:
  OnAutoThemeSwitching: true
  OnSkipNextSwitch: true
AutoSwitchNotify:
  Enabled: false
  GracePeriodMinutes: 5
Hotkeys:
  Enabled: false
  ForceLight: 
  ForceDark: 
  NoForce: 
  ToggleTheme: 
  TogglePostpone: 
  ToggleAutoThemeSwitch: 
IdleChecker:
  Enabled: false
  Threshold: 5
WallpaperSwitch:
  Enabled: false
  Component:
    TypeLight: Individual
    TypeDark: Individual
    Position: Fill
    GlobalWallpaper:
      Light: 
      Dark: 
    SolidColors:
      Light: '#FFFFFF'
      Dark: '#000000'
    Monitors:
    - Id: '\\?\DISPLAY#LEN66F9#7&289ec95a&0&UID260#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: ''
      DarkThemeWallpaper: ''
    - Id: '\\?\DISPLAY#DELA245#7&289ec95a&0&UID256#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: ''
      DarkThemeWallpaper: ''
    - Id: '\\?\DISPLAY#LEN66F9#7&289ec95a&0&UID264#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: ''
      DarkThemeWallpaper: ''
    - Id: '\\?\DISPLAY#GSMC0A0#7&289ec95a&0&UID268#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: ''
      DarkThemeWallpaper: ''
Updater:
  AutoInstall: false
  Enabled: true
  Silent: false
  DaysBetweenUpdateCheck: 7
  CheckOnStart: false
  VersionQueryUrl: 
  DownloadBaseUrl: 
  ZipCustomUrl: 
  HashCustomUrl: 

Commit Hash, Version and Windows Build

Screenshots / Videos

https://www.youtube.com/watch?v=24PQz7kJ46I

Spiritreader commented 8 months ago

Can you turn on debug and trace mode in the settings and post again logs again? As well as upload the ADMManagedTheme theme file found in %localappdata%\Microsoft\Windows\Themes

AndreasBackx commented 8 months ago

Awkwardly enough, I cannot reproduce it anymore. I'll close this for now. If I am able to reproduce it again, I will post the trace logs and the theme you requested. Thanks for getting back!