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

Classic theme enable with extended compatibility #885

Conversation

levitation
Copy link
Contributor

@levitation levitation commented Aug 22, 2024

This mod version adds support for RDP sessions and compatibility with early / system start of Windhawk.

Added also personally validated and updated instructions for setting up rest of classic theme configuration in case of a new operating system installation.

Initially I proposed to merge the updates to Anixx's classic theme enable mod, but they suggested that I create a separate mod in order to be able to provide better support. So after a bit of further polishing and adding the instructions I am now creating a pull request for publishing it as a separate mod.

@m417z
Copy link
Member

m417z commented Aug 22, 2024

LMK when it's ready to be merged.

@levitation
Copy link
Contributor Author

LMK when it's ready to be merged.

Thank you! Yes, it is ready for merge.

@m417z m417z merged commit 576aabb into ramensoftware:main Aug 22, 2024
5 checks passed
Comment on lines +185 to +195
1. Start Task Scheduler
2. Open "Task Scheduler Library" section
3. Find the row titled "WindhawkRunUITask", open it by double clicking
4. Go to Triggers
5. Click "New..." button
6. Select Begin the task: "At startup"
7. OK
8. Click "New..." button
9. Select Begin the task: "At log on"
10. OK
11. OK
Copy link
Member

Choose a reason for hiding this comment

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

Does it actually help? It just launches the UI, unless I'm missing something.

Copy link
Contributor Author

@levitation levitation Aug 22, 2024

Choose a reason for hiding this comment

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

@m417z Maybe you are correct, I am not sure about this part, and likely you know it better. It seemed that creating a system start trigger improved the chance that Windhawk is started early enough. I see that Windhawk is also run as a service. Could there be any chance that the service does not hook into other processes until UI process is launched?

I have seen a few times that even with these Task Scheduler triggers, in one of my machines, the Windhawk might hook winlogon.exe too late. This manifests in some programs starting without classic theme.

Copy link
Member

Choose a reason for hiding this comment

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

The two are mostly independent, and the service doesn't wait for the UI. By default, the UI doesn't run on startup, the service does. In fact, the UI folder can be fully removed after installing mods and Windhawk will keep on working.

Copy link
Contributor Author

@levitation levitation Aug 22, 2024

Choose a reason for hiding this comment

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

Ok, I need to do more experiments with this then to verify whether triggering the UI somehow helps to speed up the start of the service part.

Copy link
Member

Choose a reason for hiding this comment

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

I doubt that, likely some placebo effect. You can do some experiments, but eventually I prefer to remove this misleading information in order to avoid confusion, unless you indeed find something surprising.

Now that I think about it, what might work (but I didn't try it) is picking a system service which starts early, and adding the Windhawk service to its dependency list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the idea, sounds good! I will try it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I imagine it should be a system service which is non-essential. Else there would be a risk that if Windhawk is unable to start for some reason, then the system service does not start either.

Copy link
Member

Choose a reason for hiding this comment

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

It'd be better, but perhaps you must choose an essential service to ensure the load time that's needed for this mod. Hooking into winlogon.exe already has risks and might require booting in safe mode to disable Windhawk if something goes wrong.

Copy link
Contributor Author

@levitation levitation Aug 23, 2024

Choose a reason for hiding this comment

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

Alternative would be perhaps creating a separate Task Scheduler task that triggers Windhawk service start using net start command.

Copy link
Member

Choose a reason for hiding this comment

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

You can try that, but it feels more fragile to me. Also, I don't know how early the Task Scheduler service runs, perhaps not earlier than Windhawk does now.

@OrthodoxWindows
Copy link
Contributor

OrthodoxWindows commented Aug 23, 2024

@levitation Your mod looks great, I'm urging me to try it!

I have some remarks about the description though:

  • In section 7 (Adjusting the colours and fonts) you can indicate a better program: https://gitlab.com/ftortoriello/WinClassicThemeConfig
    This program is fully up to date, handles all settings, scaling (for 4K screen users) and allows you to adjust the 3D borders according to the applied scheme. It also supports .theme files from command line.
  • If you indicate WinClassicThemeConfig in section 7, you can completely remove section 1.1, since this program takes care of the 3D borders of the menus. You can also optionally remove the section about adding WindowMetrics settings, as WinClassicThemeConfig can also change this metric
    If you want, I can provide a .reg file to add so that WinClassicThemeConfig uses a color scheme identical to the default one, but without the thick borders and with the 3D menus. This will have the advantage of being able to be applied directly, without having to restart the session.
  • In section 1.2, you indicate to delete/rename the DefaultColors key. This prevents high contrast themes from working, it is better to indicate to delete/rename the DefaultColors/Standard key
  • In section 1.3, some options that you indicate to enable in the registry are not necessary for the classic theme to work properly, they are rather optional settings (like the small icons in the taskbar) Among the required settings, "ClassicThemeMitigations" also exists in Windhawk version, it may be interesting to specify it.
  • In section 5, you can indicate that you must install the "Classic Theme Explorer Lite" mod in case the "ClassicThemeMitigations" option is disabled in ExplorerPatcher; you can also indicate to install the "Fake High Contrast" mod, which fixes several display problems in some applications with the classic theme. Finally, I think it is better to install the "DWM Unextend Frames" mod rather than the "Classic theme transparency fix" mod; it does the same thing but also supports the basic theme, which is easier for users who want to switch between themes.

@levitation
Copy link
Contributor Author

@OrthodoxWindows Thank you so much for your elaborate suggestions!

I created a Google Doc where we could work together on the Readme text. Would you be willing to add your modification points there in Suggesting mode so I can see better where you want to add the recommendations? How does that sound to you? Here it is:
https://docs.google.com/document/d/1Ko9WhRFB7XHqsAug3KKSo4PsuUxSL9_SToHiouRU1k8/edit?usp=sharing

@OrthodoxWindows
Copy link
Contributor

OrthodoxWindows commented Aug 23, 2024

Thanks you, I'll look into that.

@OrthodoxWindows
Copy link
Contributor

I will try to edit the document in Suggesting mode

@OrthodoxWindows
Copy link
Contributor

@levitation Have you been able to read my suggested edits?

@levitation
Copy link
Contributor Author

@OrthodoxWindows Thank you so much! I apologise for the confusion, I was not sure whether you finished and at the same time had to deal with various priority stuff in the meanwhile. I hope to be able to take a look soon.

@oep42
Copy link

oep42 commented Dec 7, 2024

Thanks for creating this mod. I tried it by following the instructions for setting up the classic theme here (as edited by OrthodoxWin32). I am using Windows 11 Version 22H2 (Build 22621.2506).

About 2. Additional needed software

As a replacement for Task Manager I choose System Explorer, because System Informer is too complicated for me. System Explorer can be launched with Ctrl+Alt+Insert, after adding this as shortcut key to its Start Menu properties. (System Explorer's CPU usage info was found to be incorrect with high CPU usage. To monitor performance, Windows' own "Resource Monitor" can be used.)

I also installed the Classic Task Manager, in case I use Ctrl+Alt+Delete.
(Suggestion: Add to the text of the link to the Classic Task Manager, that the "Windows 7-like Task Manager for Windows 11/10/8.1/8" should be installed, not "Classic Task Manager for Windows 11 (Windows 10 version)".)

I used the patched version of Open-Shell-Menu 4.4.191. Not sure if I could also use the unpatched version.

I had a problem with ExplorerPatcher: The buttons in the Windows taskbar were not 3D. ExplorerPatcher did not work properly because I use a firewall that blocks everything by default and does not notify me when a program tries to communicate with the Internet. I just had no idea that additional Internet access was needed. Because of this, the necessary symbols were not downloaded. This is my solution for this problem:
--- Make sure your firewall allows "C:\Windows\explorer.exe" to communicate with the Internet.
--- Go to the tab Advanced of ExplorerPatcher's Properties.
--- Make sure "Enable symbols download" is enabled.
--- Enable "Enable Console". A Windows console window will appear. After a while, messages appear in the console window (symbols are downloaded).
--- Disable "Enable Console" when no new messages appear in the console window.
--- Restart the PC.
(Suggestion: Add info to the instructions that for ExplorerPatcher to work, "C:\Windows\explorer.exe" should be allowed to communicate with the Internet, and that a temporary "Enable Console" is required to download symbols.)
(Suggestion: Add a note to the Troubleshooting section for what to do if the buttons in the Windows taskbar are not 3D.)

About 3. Needed changes in Windhawk settings

For the six mods I decided to use, only these two items have to be added to the process inclusion list: "dllhost.exe" and "winlogon.exe".
(Suggestion: Specify here which items are needed for which mods.)

About 5. Additional needed classic theme related mods

I decided to use these six mods: "Classic Task Dialog Fix", "Classic Taskbar 3D buttons Lite", "Classic Taskbar background fix", "Classic theme transparency fix", "Classic UWP Fix", and "Clientedge Everywhere". The other mods had no added value for me.
--- In all programs without hard-coded rounded corners that I tried, rounded corners were disabled, so the mod "Disable rounded corners in Windows 11" has no added value for me. (Suggestion: Add a note that this mod may not be needed to disable rounded corners.) [Note: Toast notifications still have rounded corners, which is perfectly fine for me. I am not looking for nostalgia where everything is the same as in the past, but for a user interface that helps me be as productive as possible.]
--- For me, the mod "Fake High Contrast" caused some very ugly dialog boxes, and may not be needed at all, because in the Effects tab of "WinClassicThemeConfig", the option "High Contrast mode" seems to have the same effect.

About 6. How to configure system start of Windhawk

I skipped this. For me, this mod works without setting anything in Task Scheduler.
(Suggestion: Add a note that this may not be needed at all.)

About 7. Adjusting the colours, window metric and fonts

I used "WinClassicThemeConfig" (its dialog box is named "Appearance Properties") with the reg file to get the scheme present in Windows 2000 and XP, with "Color scheme = Windows Standard" and "Size = 4-Windows 10". After completing the instructions for setting up the classic theme, this results in the following user interface:

Windows user interface with Classic Theme

In the "Appearance Properties" dialog box, items of this user interface can can be enlarged for those who find things too small. (For me, "WinClassicThemeConfig" is clearly superior to "Desktop Themes" and "Desktop Architect".)
(Suggestion: The current version of WinClassicThemeConfig has a higher version number than 1.5.5.2, so I would omit that number from the link text.)

Other remarks

With version 1.2.1 of this mod, I had a few of these crashes: "Your session was logged off because DWM crashed". With the current version 1.3.1, these crashes seem to be a thing of the past.

A thing that could be improved is the user interface of File Explorer, especially the title bar. This is what an active and inactive File Explorer window looks like now:

Active and inactive window of Windows File Explorer

The buttons in the upper right corner of the File Explorer window do not work now. (None of the mods from "5. Additional needed classic theme related mods" improved the user interface of File Explorer.)

Conclusion: Nice mod that works well.

Addendum: After increasing the size of some items and using a semibold version of the font for the title bar, this is the resulting user interface:

User interface after some changes

@levitation
Copy link
Contributor Author

@oep42 Thank you for elaborate feedback! I plan to return to updating the readme file of the mod, once I finally get over the current busy spell and can give this topic the attention it deserves.

@oep42
Copy link

oep42 commented Dec 14, 2024

Some additional remarks

The problem with the title bar of the user interface of File Explorer is fixed by selecting "Control Interface = Windows 7 Command Bar" or "Control Interface = Windows 10 Ribbon" in "Properties/File Explorer" of ExplorerPatcher.
(Suggestion: Add to "1. Needed registry changes", to the changes in the registry for ExplorerPatcher, that in "Properties/File Explorer" "Control Interface = Windows 7 Command Bar" is selected. Also add that in "Properties/File Explorer", the option "Shrink address bar height" is activated.)
(Suggestion: Add a note to the Troubleshooting section for what to do after restoring the default settings of ExplorerPatcher and the title bar of the user interface of File Explorer looks weird.)

Having to change things in the Windows registry, may create a barrier for those who want to use the Classic Theme but are not well versed in the registry. Suggestion to make using the Classic Theme more accessible:

Create a single reg file that can be downloaded (with instructions how to use) that contains all the changes in the registry that are necessary for using the Classic Theme (except for section "7. Adjusting the colours, window metric and fonts"):
--- In this, do not include "If you want the 3D borders in menus, import the following reg file", because there is no need for it.
--- In this, rename this registry key from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\DefaultColors\Standard" into "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\DefaultColors\Standard-Backup".
--- In this, include the necessary registry changes for ExplorerPatcher, Explorer, OpenShell, and 7 Taskbar Tweaker. (Perhaps also include the registry change for InprocServer32.)

It would be cool if there would be an easy way to undo all these changes in the registry. This may not be possible with a reg file, because the initial state of the registry before making the changes needed for the Classic Theme, may be different in each computer. So perhaps something like an installer file could be created to modify the registry for the Classic Theme (which remembers the initial state), and an uninstaller file to undo those changes and restore the registry to its initial state.

@oep42
Copy link

oep42 commented Dec 14, 2024

I have had three DWM crashes today. See here.

@levitation
Copy link
Contributor Author

levitation commented Dec 16, 2024

@oep42 Please note that this mod injects into winlogon.exe not into dwm.exe. Additionally this mod does nothing after enabling classic theme. So if dwm.exe crashes then I suspect there is general problem with Classic Theme in your machine, not with this mod in particular.

For getting started with debugging, you may want to try this mod, which is a simpler version - https://windhawk.net/mods/classic-theme-enable - though with this mod you may have additional issues. Classic theme may become enabled too late, so some programs may have no classic theme, in particular this could happen to Taskbar in some machines. Also you may have problems with logging in to the target machine over RDP, so be warned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants