Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsigned themes do not fully apply #778

Open
StraggleCraft opened this issue Sep 25, 2023 · 3 comments
Open

Unsigned themes do not fully apply #778

StraggleCraft opened this issue Sep 25, 2023 · 3 comments
Labels
wontfix This will not be worked on

Comments

@StraggleCraft
Copy link

Description

Unsigned themes do not fully apply when using ADM. I see that ADM uses SecureUXTheme, so I would have thought it would be possible to use themes that I've patched using ADM... I'm not sure if this is a bug or a feature request. The logs don't show anything interesting here, so I figured I'd see if this was a feature that could be added, or if it is a bug.

Expected Behavior

No response

Log Data

2023-09-25 01:07:24 | Info | MessageParser.Parse: signal received: invoke theme switch request
2023-09-25 01:07:41 | Info | PostponeItem.StartExpiry: PauseAutoSwitch had its expiry at 25.09.2023 06:00:01 cancelled
2023-09-25 01:07:49 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [OfficeSwitch]
2023-09-25 01:07:49 | Info | OfficeSwitch.HandleSwitch: update info - previous: Light, now: Dark, mode: Switch
2023-09-25 01:07:49 | Info | ThemeManager.UpdateTheme: dwm management: full refresh requested by user
2023-09-25 01:08:05 | Info | Tm2Handler.SetTheme: applied theme ADMUnmanagedDark, from origin: C:\Users\User\AppData\Local\Microsoft\Windows\Themes\Penumbra10s.theme directly via IThemeManager2
2023-09-25 01:08:05 | Warn | ThemeHandler.ApplyIThemeManager2: theme switching took longer than expected (15.7562201 seconds)
2023-09-25 01:08:05 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual
2023-09-25 01:08:05 | Info | Service.ToggleTheme: ui signal received: theme toggle: switching to dark theme

Commit Hash, Version and Windows Build

  • Commit: 57ef363
  • Service/App: 10.4.0.35
  • Updater: 3.1.4
  • Shell: 1.3.3.0
  • .Net: 7.0.5
  • Windows: 19045.3086

Screenshots / Videos

image
image

@Spiritreader Spiritreader added wontfix This will not be worked on and removed needs triage labels Sep 26, 2023
@Spiritreader
Copy link
Member

Spiritreader commented Sep 26, 2023

We know that, and it's currently not supported because it would require full integration of https://github.com/namazso/SecureUxTheme

We do not use SecureUXTheme per se, just the raw windows API that namaszo provided to us.

It is possible to compile the SecureUX library and hook it as DLL in Auto Dark Mode, but doing that is out of scope at the moment. We have had a bridge application that could be updated with some effort, but atm we have our hands full with just getting regular themes to work properly.

@StraggleCraft
Copy link
Author

StraggleCraft commented Sep 26, 2023

I saw that "automation" was possible with more recent builds of SecureUxTheme via a C FFI Interface... allegedly being possible to do with powershell etc...
This is way over my head though, Does this at all make the task easier than building a new SecureUX library? or still out of scope, too much work.
Thanks for the attention!

namazso/SecureUxTheme#86
namazso/SecureUxTheme#120

Also, would it be possible to add a note to https://github.com/AutoDarkMode/Windows-Auto-Night-Mode/wiki/Known-limitations that unsigned themes are not possible?

@Spiritreader
Copy link
Member

Spiritreader commented Sep 27, 2023

I saw that "automation" was possible with more recent builds of SecureUxTheme via a C FFI Interface.

Yes I compiled a version of the c ffi with and without signature verification to be used with the ADM bridge, but that was retired in favor of the in-built solution that didn't require external dlls
https://github.com/AutoDarkMode/Windows-Auto-Night-Mode/blob/master/IThemeManager2Bridge/ThemeDllWrapper.cs

Also, would it be possible to add a note to https://github.com/AutoDarkMode/Windows-Auto-Night-Mode/wiki/Known-limitations that unsigned themes are not possible?

I can do that, although themes with fake signatures were never meant to be supported in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants