├── .gitignore
├── .gitmodules
├── FrostingCfg
├── App.config
├── ExtensionCfg.cs
├── FluentFrosting.ico
├── FrostingCfg.csproj
├── LinkLabelEx.cs
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── NativeMethods.cs
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── RegistrySettings.cs
└── app.manifest
├── LICENSE
├── README.md
├── ShellFrosting.sln
└── frosting
├── constants.h
├── dllmain.cpp
├── framework.h
├── frosting.rc
├── frosting.vcxproj
├── frosting.vcxproj.filters
├── int
├── def
│ ├── ntdllex.def
│ └── shell32ex.def
├── def2lib.cmd
└── include
│ ├── ntdllex.h
│ └── shell32ex.h
├── memfind.cpp
├── memfind.h
├── pch.cpp
├── pch.h
├── preferencefx.cpp
├── preferencefx.h
└── resource.h
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 |
400 | # Visual Studio build
401 | *.exp
402 | *.lib
403 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "frosting/vnd/Detours"]
2 | path = frosting/vnd/Detours
3 | url = https://github.com/Microsoft/Detours
4 | [submodule "frosting/vnd/wil"]
5 | path = frosting/vnd/wil
6 | url = https://github.com/Microsoft/wil
7 |
--------------------------------------------------------------------------------
/FrostingCfg/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FrostingCfg/ExtensionCfg.cs:
--------------------------------------------------------------------------------
1 | using FrostingCfg.NativeMethods;
2 | using Microsoft.Win32;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Diagnostics;
7 | using System.Linq;
8 | using System.Runtime.Serialization.Formatters;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 |
12 | namespace FrostingCfg
13 | {
14 | internal static class ExtensionCfg
15 | {
16 | private const string ExtensionDllName = "frosting.dll";
17 | private const string ExtensionRegKey = @"SOFTWARE\Classes\Drive\shellex\FolderExtensions\{DED1CA7E-D1CE-4DEC-AFC0-FFEE4DEBA7E5}";
18 |
19 | internal static bool IsInstalled()
20 | {
21 | var rKey = Registry.CurrentUser.OpenSubKey(ExtensionRegKey);
22 | if (rKey != null)
23 | {
24 | rKey.Dispose();
25 | return true;
26 | }
27 | return false;
28 | }
29 |
30 | internal static int Register()
31 | {
32 | return RunRegsvr32(false);
33 | }
34 |
35 | internal static int Unregister()
36 | {
37 | return RunRegsvr32(true);
38 | }
39 |
40 | internal static string GetErrorDescription(int hResult)
41 | {
42 | var w32ex = new Win32Exception(hResult);
43 | return w32ex.Message;
44 | }
45 |
46 | internal static void RestartExplorer()
47 | {
48 | var trayWnd = User32.FindWindowW("Shell_TrayWnd", null);
49 | User32.GetWindowThreadProcessId(trayWnd, out int explorerPid);
50 | var explorerProcess = Process.GetProcessById(explorerPid);
51 | User32.PostMessageW(trayWnd, 0x5B4, IntPtr.Zero, IntPtr.Zero);
52 | explorerProcess.WaitForExit();
53 | using (var p = new Process())
54 | {
55 | p.StartInfo.FileName = "explorer.exe";
56 | p.StartInfo.WorkingDirectory = Environment.GetEnvironmentVariable("WINDIR");
57 | p.Start();
58 | }
59 | }
60 |
61 | private static int RunRegsvr32(bool unregister)
62 | {
63 | using (var p = new Process())
64 | {
65 | p.StartInfo.FileName = "regsvr32.exe";
66 | var args = unregister ? "/u " : string.Empty;
67 | args += "/s " + ExtensionDllName;
68 | p.StartInfo.Arguments = args;
69 | p.StartInfo.UseShellExecute = false;
70 | p.StartInfo.CreateNoWindow = true;
71 | p.Start();
72 | p.WaitForExit();
73 | return p.ExitCode;
74 | }
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/FrostingCfg/FluentFrosting.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thebookisclosed/ShellFrosting/714742776132d338c6140d6ff894a940b47737a8/FrostingCfg/FluentFrosting.ico
--------------------------------------------------------------------------------
/FrostingCfg/FrostingCfg.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}
8 | WinExe
9 | FrostingCfg
10 | FrostingCfg
11 | v4.8.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 | true
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 | false
37 | true
38 |
39 |
40 | app.manifest
41 |
42 |
43 | FluentFrosting.ico
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | Component
62 |
63 |
64 | Form
65 |
66 |
67 | MainForm.cs
68 |
69 |
70 |
71 |
72 |
73 |
74 | MainForm.cs
75 |
76 |
77 | ResXFileCodeGenerator
78 | Resources.Designer.cs
79 | Designer
80 |
81 |
82 | True
83 | Resources.resx
84 |
85 |
86 |
87 | SettingsSingleFileGenerator
88 | Settings.Designer.cs
89 |
90 |
91 | True
92 | Settings.settings
93 | True
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/FrostingCfg/LinkLabelEx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Windows.Forms;
4 |
5 | namespace FrostingCfg
6 | {
7 | public class LinkLabelEx : LinkLabel
8 | {
9 | private const int IDC_HAND = 32649;
10 |
11 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
12 | private static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName);
13 |
14 | private static readonly Cursor SystemHandCursor = new Cursor(LoadCursor(IntPtr.Zero, IDC_HAND));
15 |
16 | protected override void OnMouseMove(MouseEventArgs e)
17 | {
18 | base.OnMouseMove(e);
19 |
20 | // If the base class decided to show the ugly hand cursor
21 | if (OverrideCursor == Cursors.Hand)
22 | {
23 | // Show the system hand cursor instead
24 | OverrideCursor = SystemHandCursor;
25 | }
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/FrostingCfg/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace FrostingCfg
2 | {
3 | partial class MainForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.lblGroupingMode = new System.Windows.Forms.Label();
32 | this.cbxGroupingMode = new System.Windows.Forms.ComboBox();
33 | this.cbShowLabels = new System.Windows.Forms.CheckBox();
34 | this.gbMultiMon = new System.Windows.Forms.GroupBox();
35 | this.cbMultiMon = new System.Windows.Forms.CheckBox();
36 | this.cbxSecondaryMonitorsGroupingMode = new System.Windows.Forms.ComboBox();
37 | this.lblMMGroupingMode = new System.Windows.Forms.Label();
38 | this.btnApply = new System.Windows.Forms.Button();
39 | this.lblExtension = new System.Windows.Forms.Label();
40 | this.lblExStatus = new System.Windows.Forms.Label();
41 | this.btnInstall = new System.Windows.Forms.Button();
42 | this.pnlDivider = new System.Windows.Forms.Panel();
43 | this.lleSupport = new FrostingCfg.LinkLabelEx();
44 | this.gbMultiMon.SuspendLayout();
45 | this.SuspendLayout();
46 | //
47 | // lblGroupingMode
48 | //
49 | this.lblGroupingMode.AutoSize = true;
50 | this.lblGroupingMode.Location = new System.Drawing.Point(6, 53);
51 | this.lblGroupingMode.Name = "lblGroupingMode";
52 | this.lblGroupingMode.Size = new System.Drawing.Size(87, 13);
53 | this.lblGroupingMode.TabIndex = 4;
54 | this.lblGroupingMode.Text = "Taskbar &buttons:";
55 | //
56 | // cbxGroupingMode
57 | //
58 | this.cbxGroupingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
59 | this.cbxGroupingMode.FormattingEnabled = true;
60 | this.cbxGroupingMode.Items.AddRange(new object[] {
61 | "Always combine, hide labels",
62 | "Combine when taskbar is full",
63 | "Never combine"});
64 | this.cbxGroupingMode.Location = new System.Drawing.Point(99, 50);
65 | this.cbxGroupingMode.Name = "cbxGroupingMode";
66 | this.cbxGroupingMode.Size = new System.Drawing.Size(239, 21);
67 | this.cbxGroupingMode.TabIndex = 5;
68 | //
69 | // cbShowLabels
70 | //
71 | this.cbShowLabels.AutoSize = true;
72 | this.cbShowLabels.Location = new System.Drawing.Point(9, 81);
73 | this.cbShowLabels.Name = "cbShowLabels";
74 | this.cbShowLabels.Size = new System.Drawing.Size(158, 17);
75 | this.cbShowLabels.TabIndex = 6;
76 | this.cbShowLabels.Text = "Show labels on taskbar &pins";
77 | this.cbShowLabels.UseVisualStyleBackColor = true;
78 | //
79 | // gbMultiMon
80 | //
81 | this.gbMultiMon.Controls.Add(this.cbMultiMon);
82 | this.gbMultiMon.Controls.Add(this.cbxSecondaryMonitorsGroupingMode);
83 | this.gbMultiMon.Controls.Add(this.lblMMGroupingMode);
84 | this.gbMultiMon.ForeColor = System.Drawing.Color.White;
85 | this.gbMultiMon.Location = new System.Drawing.Point(9, 112);
86 | this.gbMultiMon.Name = "gbMultiMon";
87 | this.gbMultiMon.Size = new System.Drawing.Size(337, 98);
88 | this.gbMultiMon.TabIndex = 7;
89 | this.gbMultiMon.TabStop = false;
90 | this.gbMultiMon.Text = "Multiple displays";
91 | //
92 | // cbMultiMon
93 | //
94 | this.cbMultiMon.AutoSize = true;
95 | this.cbMultiMon.Location = new System.Drawing.Point(9, 21);
96 | this.cbMultiMon.Name = "cbMultiMon";
97 | this.cbMultiMon.Size = new System.Drawing.Size(159, 17);
98 | this.cbMultiMon.TabIndex = 0;
99 | this.cbMultiMon.Text = "&Show taskbar on all displays";
100 | this.cbMultiMon.UseVisualStyleBackColor = true;
101 | //
102 | // cbxSecondaryMonitorsGroupingMode
103 | //
104 | this.cbxSecondaryMonitorsGroupingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
105 | this.cbxSecondaryMonitorsGroupingMode.FormattingEnabled = true;
106 | this.cbxSecondaryMonitorsGroupingMode.Items.AddRange(new object[] {
107 | "Always combine, hide labels",
108 | "Combine when taskbar is full",
109 | "Never combine"});
110 | this.cbxSecondaryMonitorsGroupingMode.Location = new System.Drawing.Point(9, 64);
111 | this.cbxSecondaryMonitorsGroupingMode.Name = "cbxSecondaryMonitorsGroupingMode";
112 | this.cbxSecondaryMonitorsGroupingMode.Size = new System.Drawing.Size(320, 21);
113 | this.cbxSecondaryMonitorsGroupingMode.TabIndex = 2;
114 | //
115 | // lblMMGroupingMode
116 | //
117 | this.lblMMGroupingMode.AutoSize = true;
118 | this.lblMMGroupingMode.Location = new System.Drawing.Point(6, 44);
119 | this.lblMMGroupingMode.Name = "lblMMGroupingMode";
120 | this.lblMMGroupingMode.Size = new System.Drawing.Size(131, 13);
121 | this.lblMMGroupingMode.TabIndex = 1;
122 | this.lblMMGroupingMode.Text = "Buttons on &other taskbars:";
123 | //
124 | // btnApply
125 | //
126 | this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
127 | this.btnApply.Enabled = false;
128 | this.btnApply.FlatStyle = System.Windows.Forms.FlatStyle.System;
129 | this.btnApply.Location = new System.Drawing.Point(271, 220);
130 | this.btnApply.Name = "btnApply";
131 | this.btnApply.Size = new System.Drawing.Size(75, 23);
132 | this.btnApply.TabIndex = 8;
133 | this.btnApply.Text = "Apply";
134 | this.btnApply.UseVisualStyleBackColor = true;
135 | this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
136 | //
137 | // lblExtension
138 | //
139 | this.lblExtension.AutoSize = true;
140 | this.lblExtension.Location = new System.Drawing.Point(6, 12);
141 | this.lblExtension.Name = "lblExtension";
142 | this.lblExtension.Size = new System.Drawing.Size(82, 13);
143 | this.lblExtension.TabIndex = 0;
144 | this.lblExtension.Text = "Extension state:";
145 | //
146 | // lblExStatus
147 | //
148 | this.lblExStatus.AutoSize = true;
149 | this.lblExStatus.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(240)))), ((int)(((byte)(0)))));
150 | this.lblExStatus.Location = new System.Drawing.Point(96, 12);
151 | this.lblExStatus.Name = "lblExStatus";
152 | this.lblExStatus.Size = new System.Drawing.Size(62, 13);
153 | this.lblExStatus.TabIndex = 1;
154 | this.lblExStatus.Text = "Not present";
155 | //
156 | // btnInstall
157 | //
158 | this.btnInstall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
159 | this.btnInstall.FlatStyle = System.Windows.Forms.FlatStyle.System;
160 | this.btnInstall.Location = new System.Drawing.Point(271, 7);
161 | this.btnInstall.Name = "btnInstall";
162 | this.btnInstall.Size = new System.Drawing.Size(75, 23);
163 | this.btnInstall.TabIndex = 2;
164 | this.btnInstall.Text = "&Install";
165 | this.btnInstall.UseVisualStyleBackColor = true;
166 | this.btnInstall.Click += new System.EventHandler(this.btnInstall_Click);
167 | //
168 | // pnlDivider
169 | //
170 | this.pnlDivider.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
171 | this.pnlDivider.Location = new System.Drawing.Point(9, 39);
172 | this.pnlDivider.Name = "pnlDivider";
173 | this.pnlDivider.Size = new System.Drawing.Size(337, 1);
174 | this.pnlDivider.TabIndex = 3;
175 | //
176 | // lleSupport
177 | //
178 | this.lleSupport.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(194)))), ((int)(((byte)(255)))));
179 | this.lleSupport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
180 | this.lleSupport.AutoSize = true;
181 | this.lleSupport.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(235)))), ((int)(((byte)(255)))));
182 | this.lleSupport.Location = new System.Drawing.Point(6, 225);
183 | this.lleSupport.Name = "lleSupport";
184 | this.lleSupport.Size = new System.Drawing.Size(202, 13);
185 | this.lleSupport.TabIndex = 9;
186 | this.lleSupport.TabStop = true;
187 | this.lleSupport.Text = "Like the project? You can support it here.";
188 | this.lleSupport.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(235)))), ((int)(((byte)(255)))));
189 | this.lleSupport.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lleSupport_LinkClicked);
190 | //
191 | // MainForm
192 | //
193 | this.AcceptButton = this.btnApply;
194 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
195 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
196 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
197 | this.ClientSize = new System.Drawing.Size(356, 253);
198 | this.Controls.Add(this.lleSupport);
199 | this.Controls.Add(this.gbMultiMon);
200 | this.Controls.Add(this.pnlDivider);
201 | this.Controls.Add(this.lblGroupingMode);
202 | this.Controls.Add(this.btnInstall);
203 | this.Controls.Add(this.cbxGroupingMode);
204 | this.Controls.Add(this.lblExStatus);
205 | this.Controls.Add(this.cbShowLabels);
206 | this.Controls.Add(this.btnApply);
207 | this.Controls.Add(this.lblExtension);
208 | this.ForeColor = System.Drawing.Color.White;
209 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
210 | this.MaximizeBox = false;
211 | this.Name = "MainForm";
212 | this.Text = "Frosting Configuration";
213 | this.Load += new System.EventHandler(this.MainForm_Load);
214 | this.gbMultiMon.ResumeLayout(false);
215 | this.gbMultiMon.PerformLayout();
216 | this.ResumeLayout(false);
217 | this.PerformLayout();
218 |
219 | }
220 |
221 | #endregion
222 |
223 | private System.Windows.Forms.Label lblGroupingMode;
224 | private System.Windows.Forms.ComboBox cbxGroupingMode;
225 | private System.Windows.Forms.CheckBox cbShowLabels;
226 | private System.Windows.Forms.GroupBox gbMultiMon;
227 | private System.Windows.Forms.ComboBox cbxSecondaryMonitorsGroupingMode;
228 | private System.Windows.Forms.Label lblMMGroupingMode;
229 | private System.Windows.Forms.Button btnApply;
230 | private System.Windows.Forms.CheckBox cbMultiMon;
231 | private System.Windows.Forms.Label lblExtension;
232 | private System.Windows.Forms.Label lblExStatus;
233 | private System.Windows.Forms.Button btnInstall;
234 | private System.Windows.Forms.Panel pnlDivider;
235 | private LinkLabelEx lleSupport;
236 | }
237 | }
238 |
239 |
--------------------------------------------------------------------------------
/FrostingCfg/MainForm.cs:
--------------------------------------------------------------------------------
1 | using FrostingCfg.NativeMethods;
2 | using System;
3 | using System.Drawing;
4 | using System.Windows.Forms;
5 |
6 | namespace FrostingCfg
7 | {
8 | public partial class MainForm : Form
9 | {
10 | public MainForm()
11 | {
12 | HandleCreated += MainForm_HandleCreated;
13 | InitializeComponent();
14 | btnApply.HandleCreated += OnHandleCreated;
15 | btnInstall.HandleCreated += OnHandleCreated;
16 |
17 | cbShowLabels.HandleCreated += OnHandleCreated;
18 | cbMultiMon.HandleCreated += OnHandleCreated;
19 | cbxGroupingMode.HandleCreated += OnHandleCreatedCFD;
20 | cbxSecondaryMonitorsGroupingMode.HandleCreated += OnHandleCreatedCFD;
21 |
22 | const int IDI_APPLICATION = 32512;
23 | var ourHandle = Kernel32.GetModuleHandleW(null);
24 | var hIcon = User32.LoadIconW(ourHandle, new IntPtr(IDI_APPLICATION));
25 | Icon = Icon.FromHandle(hIcon);
26 | }
27 |
28 | private void MainForm_Load(object sender, EventArgs e)
29 | {
30 | UpdateExtensionStatus();
31 | }
32 |
33 | private bool UpdateExtensionStatus()
34 | {
35 | var isInstalled = ExtensionCfg.IsInstalled();
36 | if (!isInstalled)
37 | {
38 | btnApply.Enabled = false;
39 | lblExStatus.ForeColor = Color.FromArgb(255, 240, 0);
40 | lblExStatus.Text = "Not present";
41 | btnInstall.Text = "&Install";
42 | btnInstall.Tag = false;
43 | }
44 | else
45 | {
46 | btnApply.Enabled = true;
47 | lblExStatus.ForeColor = Color.FromArgb(69, 212, 0);
48 | lblExStatus.Text = "Installed";
49 | btnInstall.Text = "Un&install";
50 | btnInstall.Tag = true;
51 | }
52 | RefreshSettings();
53 | return isInstalled;
54 | }
55 |
56 | private void RefreshSettings()
57 | {
58 | RegistrySettings.Refresh();
59 | var sb = RegistrySettings.Bag;
60 | cbShowLabels.Checked = sb.TaskbarShowLabels;
61 | cbMultiMon.Checked = sb.MMTaskbarEnabled;
62 | cbxGroupingMode.SelectedIndex = sb.TaskbarGlomLevel;
63 | cbxSecondaryMonitorsGroupingMode.SelectedIndex = sb.MMTaskbarGlomLevel;
64 | }
65 |
66 | private void btnInstall_Click(object sender, EventArgs e)
67 | {
68 | var ynResult = MessageBox.Show("Configuring the extension requires a restart of File Explorer.\nDo you wish to continue?",
69 | Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
70 |
71 | if (ynResult != DialogResult.Yes)
72 | return;
73 |
74 | var shouldUninstall = (bool)btnInstall.Tag;
75 | var regResult = shouldUninstall ? ExtensionCfg.Unregister() : ExtensionCfg.Register();
76 |
77 | if (regResult != 0)
78 | {
79 | var errorString = string.Format("Extension configuration failed\n\n{0}\n(Error {1})",
80 | ExtensionCfg.GetErrorDescription(regResult),
81 | regResult);
82 | MessageBox.Show(errorString, Text,
83 | MessageBoxButtons.OK, MessageBoxIcon.Error);
84 | return;
85 | }
86 |
87 | ExtensionCfg.RestartExplorer();
88 | UpdateExtensionStatus();
89 | }
90 |
91 | private void btnApply_Click(object sender, EventArgs e)
92 | {
93 | var ns = new SettingBag()
94 | {
95 | TaskbarShowLabels = cbShowLabels.Checked,
96 | MMTaskbarEnabled = cbMultiMon.Checked,
97 | TaskbarGlomLevel = cbxGroupingMode.SelectedIndex,
98 | MMTaskbarGlomLevel = cbxSecondaryMonitorsGroupingMode.SelectedIndex
99 | };
100 | RegistrySettings.Update(ns);
101 | }
102 |
103 | private void lleSupport_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
104 | {
105 | System.Diagnostics.Process.Start("https://www.paypal.me/tfwboredom");
106 | }
107 |
108 | private unsafe void MainForm_HandleCreated(object sender, EventArgs e)
109 | {
110 | UxTheme.SetPreferredAppMode(1);
111 | const int WCA_USEDARKMODECOLORS = 26;
112 | int enabled = 1;
113 | var attribs = new WINDOWCOMPOSITIONATTRIBDATA()
114 | {
115 | Attrib = WCA_USEDARKMODECOLORS,
116 | pvData = &enabled,
117 | cbData = sizeof(int)
118 | };
119 | User32.SetWindowCompositionAttribute(Handle, &attribs);
120 | OnHandleCreated(sender, e);
121 | }
122 |
123 | private void OnHandleCreated(object sender, EventArgs e)
124 | {
125 | MakeDark((Control)sender, "DarkMode_Explorer");
126 | }
127 |
128 | private void OnHandleCreatedCFD(object sender, EventArgs e)
129 | {
130 | MakeDark((Control)sender, "DarkMode_CFD");
131 | }
132 |
133 | private unsafe void MakeDark(Control sender, string pszSubAppName)
134 | {
135 | const int WM_THEMECHANGED = 0x31A;
136 | var handle = sender.Handle;
137 |
138 | UxTheme.AllowDarkModeForWindow(handle, true);
139 | UxTheme.SetWindowTheme(handle, pszSubAppName, null);
140 | User32.SendMessageW(handle, WM_THEMECHANGED, new IntPtr(0xFFFFFFFC), new IntPtr(3));
141 | }
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/FrostingCfg/MainForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/FrostingCfg/NativeMethods.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace FrostingCfg.NativeMethods
5 | {
6 | internal static class UxTheme
7 | {
8 | [DllImport("uxtheme.dll", EntryPoint = "#133")]
9 | internal static extern int AllowDarkModeForWindow(IntPtr hWnd, [MarshalAs(UnmanagedType.I1)] bool bAllow);
10 |
11 | [DllImport("uxtheme.dll", EntryPoint = "#135")]
12 | internal static extern int SetPreferredAppMode(int dwMode);
13 |
14 | [DllImport("uxtheme.dll", EntryPoint = "#191", CharSet = CharSet.Unicode)]
15 | internal static extern int SetWindowTheme(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszSubAppName, [MarshalAs(UnmanagedType.LPWStr)] string pszSubIdList);
16 | }
17 |
18 | internal static class User32
19 | {
20 | [DllImport("user32.dll", ExactSpelling = true)]
21 | internal static unsafe extern int SetWindowCompositionAttribute(IntPtr hWnd, WINDOWCOMPOSITIONATTRIBDATA* pAttrData);
22 |
23 | [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
24 | internal static extern int SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
25 |
26 | [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
27 | internal static extern IntPtr LoadIconW(IntPtr hInstance, IntPtr lpIconName);
28 |
29 | [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
30 | internal static extern IntPtr FindWindowW([MarshalAs(UnmanagedType.LPWStr)] string lpClassName, [MarshalAs(UnmanagedType.LPWStr)] string lpWindowName);
31 |
32 | [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
33 | internal static extern IntPtr PostMessageW(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
34 |
35 | [DllImport("user32.dll", ExactSpelling = true)]
36 | internal static extern uint GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
37 | }
38 |
39 | internal static class Kernel32
40 | {
41 | [DllImport("kernel32.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
42 | internal static extern IntPtr GetModuleHandleW([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName);
43 | }
44 |
45 | [StructLayout(LayoutKind.Sequential)]
46 | internal unsafe struct WINDOWCOMPOSITIONATTRIBDATA
47 | {
48 | internal int Attrib;
49 | internal int* pvData;
50 | internal int cbData;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/FrostingCfg/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace FrostingCfg
8 | {
9 | internal static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new MainForm());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/FrostingCfg/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Frosting Configuration")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FrostingCfg")]
13 | [assembly: AssemblyCopyright("Copyright © @thebookisclosed 2023")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("67f3d079-1eb4-48cc-9da8-738e38dc4f0d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2023.5.8.0")]
36 | [assembly: AssemblyFileVersion("2023.5.8.0")]
37 |
--------------------------------------------------------------------------------
/FrostingCfg/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FrostingCfg.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FrostingCfg.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/FrostingCfg/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/FrostingCfg/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FrostingCfg.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/FrostingCfg/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FrostingCfg/RegistrySettings.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Win32;
2 |
3 | namespace FrostingCfg
4 | {
5 | internal static class RegistrySettings
6 | {
7 | internal static SettingBag Bag = new SettingBag();
8 |
9 | internal static void Refresh()
10 | {
11 | using (var rKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"))
12 | {
13 | var regObj = rKey.GetValue("TaskbarShowLabels");
14 | if (regObj != null)
15 | Bag.TaskbarShowLabels = (int)regObj == 1;
16 | else
17 | Bag.TaskbarShowLabels = false;
18 |
19 | regObj = rKey.GetValue("MMTaskbarEnabled");
20 | if (regObj != null)
21 | Bag.MMTaskbarEnabled = (int)regObj == 1;
22 | else
23 | Bag.MMTaskbarEnabled = false;
24 |
25 | regObj = rKey.GetValue("TaskbarGlomLevel");
26 | if (regObj != null)
27 | Bag.TaskbarGlomLevel = UnboxCappedInt(regObj, 2, 0);
28 | else
29 | Bag.TaskbarGlomLevel = 0;
30 |
31 | regObj = rKey.GetValue("MMTaskbarGlomLevel");
32 | if (regObj != null)
33 | Bag.MMTaskbarGlomLevel = UnboxCappedInt(regObj, 2, 0);
34 | else
35 | Bag.MMTaskbarGlomLevel = 0;
36 | }
37 | }
38 |
39 | internal static int UnboxCappedInt(object boxedInt, int cap, int fallback)
40 | {
41 | var unboxedU = (uint)(int)boxedInt;
42 | if (unboxedU > cap)
43 | return fallback;
44 | else
45 | return (int)unboxedU;
46 | }
47 |
48 | internal static void Update(SettingBag newSettings)
49 | {
50 | using (var rKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", true))
51 | {
52 | if (newSettings.TaskbarShowLabels != Bag.TaskbarShowLabels)
53 | rKey.SetValue("TaskbarShowLabels", newSettings.TaskbarShowLabels ? 1 : 0, RegistryValueKind.DWord);
54 | if (newSettings.MMTaskbarEnabled != Bag.MMTaskbarEnabled)
55 | rKey.SetValue("MMTaskbarEnabled", newSettings.MMTaskbarEnabled ? 1 : 0, RegistryValueKind.DWord);
56 | if (newSettings.TaskbarGlomLevel != Bag.TaskbarGlomLevel)
57 | rKey.SetValue("TaskbarGlomLevel", newSettings.TaskbarGlomLevel, RegistryValueKind.DWord);
58 | if (newSettings.MMTaskbarGlomLevel != Bag.MMTaskbarGlomLevel)
59 | rKey.SetValue("MMTaskbarGlomLevel", newSettings.MMTaskbarGlomLevel, RegistryValueKind.DWord);
60 | }
61 | Bag = newSettings;
62 | }
63 | }
64 |
65 | internal class SettingBag
66 | {
67 | internal bool TaskbarShowLabels;
68 | internal bool MMTaskbarEnabled;
69 | internal int TaskbarGlomLevel;
70 | internal int MMTaskbarGlomLevel;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/FrostingCfg/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | true
19 |
20 |
21 |
22 |
23 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Shell Frosting
2 | Shell Frosting is a fun, unconventional "shell extension" designed to enable **unfinished** shell features hidden in Windows Insider builds.
3 |
4 | As of right now it enables the following features:
5 | - Taskbar item ungrouping & labeling
6 | - all builds that contain this feature should be supported (*rs_prerelease* 25246+, *ni_prerelease* 23403+)
7 | - *zn_release* builds **do NOT** support this feature
8 |
9 | [](https://GitHub.com/thebookisclosed/ShellFrosting/releases/)
10 |
11 | # Components
12 | The code fixing various broken or incomplete functions of the OS is located in the `frosting` library project.
13 |
14 | `FrostingCfg` is a simple UI which lets you install/uninstall the extension, as well as configure the newly enabled features that aren't yet covered by Windows' Settings app.
15 |
16 | 
17 |
18 | # Known issues
19 | - Taskbar items sometimes lack icons or have outdated icons and titles if grouping is off
20 | - The root cause resides within Windows-provided code and is not a bug caused by the extension.
21 | - An easy workaround is to turn grouping on and back off again.
22 |
23 | # Todos
24 | - [ ] Arm64 support
25 | - [ ] Fix icon and title desync if possible
26 |
27 | # Support
28 | If you like this kind of project and would like to see more, any support is greatly appreciated.
29 |
30 | You can support the project using GitHub Sponsors in the sidebar or [here](https://www.paypal.me/tfwboredom).
31 |
--------------------------------------------------------------------------------
/ShellFrosting.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.5.33627.172
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frosting", "frosting\frosting.vcxproj", "{0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {37489709-8054-4903-9C49-A79846049FC9} = {37489709-8054-4903-9C49-A79846049FC9}
9 | EndProjectSection
10 | EndProject
11 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{8F6D80E5-E92D-4EF6-A0D3-A5468001D88F}"
12 | EndProject
13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detours", "frosting\vnd\Detours\vc\Detours.vcxproj", "{37489709-8054-4903-9C49-A79846049FC9}"
14 | EndProject
15 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrostingCfg", "FrostingCfg\FrostingCfg.csproj", "{67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}"
16 | EndProject
17 | Global
18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
19 | Debug|Any CPU = Debug|Any CPU
20 | Debug|ARM = Debug|ARM
21 | Debug|ARM64 = Debug|ARM64
22 | Debug|x64 = Debug|x64
23 | Debug|x86 = Debug|x86
24 | DebugMDd|Any CPU = DebugMDd|Any CPU
25 | DebugMDd|ARM = DebugMDd|ARM
26 | DebugMDd|ARM64 = DebugMDd|ARM64
27 | DebugMDd|x64 = DebugMDd|x64
28 | DebugMDd|x86 = DebugMDd|x86
29 | Release|Any CPU = Release|Any CPU
30 | Release|ARM = Release|ARM
31 | Release|ARM64 = Release|ARM64
32 | Release|x64 = Release|x64
33 | Release|x86 = Release|x86
34 | ReleaseMD|Any CPU = ReleaseMD|Any CPU
35 | ReleaseMD|ARM = ReleaseMD|ARM
36 | ReleaseMD|ARM64 = ReleaseMD|ARM64
37 | ReleaseMD|x64 = ReleaseMD|x64
38 | ReleaseMD|x86 = ReleaseMD|x86
39 | EndGlobalSection
40 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
41 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|Any CPU.ActiveCfg = Debug|x64
42 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|Any CPU.Build.0 = Debug|x64
43 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|ARM.ActiveCfg = Debug|x64
44 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|ARM.Build.0 = Debug|x64
45 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|ARM64.ActiveCfg = Debug|x64
46 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|ARM64.Build.0 = Debug|x64
47 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|x64.ActiveCfg = Debug|x64
48 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|x64.Build.0 = Debug|x64
49 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|x86.ActiveCfg = Debug|Win32
50 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Debug|x86.Build.0 = Debug|Win32
51 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|Any CPU.ActiveCfg = Debug|x64
52 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|Any CPU.Build.0 = Debug|x64
53 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|ARM.ActiveCfg = Debug|x64
54 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|ARM.Build.0 = Debug|x64
55 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|ARM64.ActiveCfg = Debug|x64
56 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|ARM64.Build.0 = Debug|x64
57 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|x64.ActiveCfg = Debug|x64
58 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|x64.Build.0 = Debug|x64
59 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|x86.ActiveCfg = Debug|Win32
60 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.DebugMDd|x86.Build.0 = Debug|Win32
61 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|Any CPU.ActiveCfg = Release|x64
62 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|Any CPU.Build.0 = Release|x64
63 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|ARM.ActiveCfg = Release|x64
64 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|ARM.Build.0 = Release|x64
65 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|ARM64.ActiveCfg = Release|x64
66 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|ARM64.Build.0 = Release|x64
67 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|x64.ActiveCfg = Release|x64
68 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|x64.Build.0 = Release|x64
69 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|x86.ActiveCfg = Release|Win32
70 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.Release|x86.Build.0 = Release|Win32
71 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|Any CPU.ActiveCfg = Release|x64
72 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|Any CPU.Build.0 = Release|x64
73 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|ARM.ActiveCfg = Release|x64
74 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|ARM.Build.0 = Release|x64
75 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|ARM64.ActiveCfg = Release|x64
76 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|ARM64.Build.0 = Release|x64
77 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|x64.ActiveCfg = Release|x64
78 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|x64.Build.0 = Release|x64
79 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|x86.ActiveCfg = Release|Win32
80 | {0314F3E4-1980-4FF4-9CBD-F8B6DA4608E0}.ReleaseMD|x86.Build.0 = Release|Win32
81 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|Any CPU.ActiveCfg = DebugMDd|x64
82 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|Any CPU.Build.0 = DebugMDd|x64
83 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|ARM.ActiveCfg = DebugMDd|ARM
84 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|ARM.Build.0 = DebugMDd|ARM
85 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|ARM64.ActiveCfg = DebugMDd|ARM64
86 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|ARM64.Build.0 = DebugMDd|ARM64
87 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|x64.ActiveCfg = DebugMDd|x64
88 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|x64.Build.0 = DebugMDd|x64
89 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|x86.ActiveCfg = DebugMDd|Win32
90 | {37489709-8054-4903-9C49-A79846049FC9}.Debug|x86.Build.0 = DebugMDd|Win32
91 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|Any CPU.ActiveCfg = DebugMDd|x64
92 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|Any CPU.Build.0 = DebugMDd|x64
93 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|ARM.ActiveCfg = DebugMDd|ARM
94 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|ARM.Build.0 = DebugMDd|ARM
95 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|ARM64.ActiveCfg = DebugMDd|ARM64
96 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|ARM64.Build.0 = DebugMDd|ARM64
97 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|x64.ActiveCfg = DebugMDd|x64
98 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|x64.Build.0 = DebugMDd|x64
99 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|x86.ActiveCfg = DebugMDd|Win32
100 | {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|x86.Build.0 = DebugMDd|Win32
101 | {37489709-8054-4903-9C49-A79846049FC9}.Release|Any CPU.ActiveCfg = ReleaseMD|x64
102 | {37489709-8054-4903-9C49-A79846049FC9}.Release|Any CPU.Build.0 = ReleaseMD|x64
103 | {37489709-8054-4903-9C49-A79846049FC9}.Release|ARM.ActiveCfg = ReleaseMD|ARM
104 | {37489709-8054-4903-9C49-A79846049FC9}.Release|ARM.Build.0 = ReleaseMD|ARM
105 | {37489709-8054-4903-9C49-A79846049FC9}.Release|ARM64.ActiveCfg = ReleaseMD|ARM64
106 | {37489709-8054-4903-9C49-A79846049FC9}.Release|ARM64.Build.0 = ReleaseMD|ARM64
107 | {37489709-8054-4903-9C49-A79846049FC9}.Release|x64.ActiveCfg = ReleaseMD|x64
108 | {37489709-8054-4903-9C49-A79846049FC9}.Release|x64.Build.0 = ReleaseMD|x64
109 | {37489709-8054-4903-9C49-A79846049FC9}.Release|x86.ActiveCfg = ReleaseMD|Win32
110 | {37489709-8054-4903-9C49-A79846049FC9}.Release|x86.Build.0 = ReleaseMD|Win32
111 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|Any CPU.ActiveCfg = ReleaseMD|x64
112 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|Any CPU.Build.0 = ReleaseMD|x64
113 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|ARM.ActiveCfg = ReleaseMD|ARM
114 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|ARM.Build.0 = ReleaseMD|ARM
115 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|ARM64.ActiveCfg = ReleaseMD|ARM64
116 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|ARM64.Build.0 = ReleaseMD|ARM64
117 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|x64.ActiveCfg = ReleaseMD|x64
118 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|x64.Build.0 = ReleaseMD|x64
119 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|x86.ActiveCfg = ReleaseMD|Win32
120 | {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|x86.Build.0 = ReleaseMD|Win32
121 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
122 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
123 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|ARM.ActiveCfg = Debug|Any CPU
124 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|ARM.Build.0 = Debug|Any CPU
125 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
126 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|ARM64.Build.0 = Debug|Any CPU
127 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|x64.ActiveCfg = Debug|Any CPU
128 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|x64.Build.0 = Debug|Any CPU
129 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|x86.ActiveCfg = Debug|Any CPU
130 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Debug|x86.Build.0 = Debug|Any CPU
131 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|Any CPU.ActiveCfg = Debug|Any CPU
132 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|Any CPU.Build.0 = Debug|Any CPU
133 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|ARM.ActiveCfg = Debug|Any CPU
134 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|ARM.Build.0 = Debug|Any CPU
135 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|ARM64.ActiveCfg = Debug|Any CPU
136 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|ARM64.Build.0 = Debug|Any CPU
137 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|x64.ActiveCfg = Debug|Any CPU
138 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|x64.Build.0 = Debug|Any CPU
139 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|x86.ActiveCfg = Debug|Any CPU
140 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.DebugMDd|x86.Build.0 = Debug|Any CPU
141 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
142 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|Any CPU.Build.0 = Release|Any CPU
143 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|ARM.ActiveCfg = Release|Any CPU
144 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|ARM.Build.0 = Release|Any CPU
145 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|ARM64.ActiveCfg = Release|Any CPU
146 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|ARM64.Build.0 = Release|Any CPU
147 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|x64.ActiveCfg = Release|Any CPU
148 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|x64.Build.0 = Release|Any CPU
149 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|x86.ActiveCfg = Release|Any CPU
150 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.Release|x86.Build.0 = Release|Any CPU
151 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|Any CPU.ActiveCfg = Release|Any CPU
152 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|Any CPU.Build.0 = Release|Any CPU
153 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|ARM.ActiveCfg = Release|Any CPU
154 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|ARM.Build.0 = Release|Any CPU
155 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|ARM64.ActiveCfg = Release|Any CPU
156 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|ARM64.Build.0 = Release|Any CPU
157 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|x64.ActiveCfg = Release|Any CPU
158 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|x64.Build.0 = Release|Any CPU
159 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|x86.ActiveCfg = Release|Any CPU
160 | {67F3D079-1EB4-48CC-9DA8-738E38DC4F0D}.ReleaseMD|x86.Build.0 = Release|Any CPU
161 | EndGlobalSection
162 | GlobalSection(SolutionProperties) = preSolution
163 | HideSolutionNode = FALSE
164 | EndGlobalSection
165 | GlobalSection(NestedProjects) = preSolution
166 | {37489709-8054-4903-9C49-A79846049FC9} = {8F6D80E5-E92D-4EF6-A0D3-A5468001D88F}
167 | EndGlobalSection
168 | GlobalSection(ExtensibilityGlobals) = postSolution
169 | SolutionGuid = {4927585B-576D-497E-877A-C69B6820C17B}
170 | EndGlobalSection
171 | EndGlobal
172 |
--------------------------------------------------------------------------------
/frosting/constants.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #define UX_CLSID "{DED1CA7E-D1CE-4DEC-AFC0-FFEE4DEBA7E5}"
3 | static const wchar_t DummyEmptyString[] = L"";
4 | static const GUID IID_ITaskbarSettings5 = { 0x1F232362, 0xF96B, 0x57AB, { 0xBD, 0x0A, 0x1F, 0xF8, 0xE2, 0x53, 0xC7, 0x3C } };
5 | static const WNF_STATE_NAME WNF_DX_DISPLAY_CONFIG_CHANGE_NOTIFICATION = { 0xa3bc5835, 0x41c61629 };
--------------------------------------------------------------------------------
/frosting/dllmain.cpp:
--------------------------------------------------------------------------------
1 | // dllmain.cpp : Defines the entry point for the DLL application.
2 | #include "pch.h"
3 | #include "shell32ex.h"
4 | #include "detours.h"
5 | #include "wil/registry.h"
6 | #include "unknwn.h"
7 | #include "ntdllex.h"
8 | #include "preferencefx.h"
9 | #include "memfind.h"
10 | #include "constants.h"
11 | #pragma comment(lib, "detours.lib")
12 |
13 | HMODULE g_hModule = NULL, g_hTaskbarMod = NULL;
14 | bool g_bLoadedInExplorer = false, g_bMultiMonEnabled = false, g_bShowLabels = false;
15 | int g_dwGroupingMode = 0, g_dwMMGroupingMode = 0, g_dwMonitorCount = 0;
16 | void** g_pPrimaryTaskbarSettings = nullptr;
17 | ptrdiff_t g_nSettings5ToBaseClassDiff = 0;
18 | HANDLE g_hWnfDisplayChangeSub = NULL;
19 | wil::unique_registry_watcher g_cPrefRegWatcher = nullptr;
20 |
21 | wchar_t* (__stdcall* RealGetOverlayIconDescription)(void** This) = NULL;
22 | void(__stdcall* RealTaskbarSettingsInitialize)(void** This) = NULL;
23 | HRESULT(__stdcall* Realget_GroupingMode)(void** This, int* groupingMode) = NULL;
24 | HRESULT(__stdcall* Realget_ShowLabels)(void** This, bool* showLabels) = NULL;
25 | NTSTATUS(NTAPI* RealRtlQueryFeatureConfiguration)(_In_ ULONG FeatureId,
26 | _In_ RTL_FEATURE_CONFIGURATION_TYPE FeatureType,
27 | _Inout_ PULONGLONG ChangeStamp,
28 | _In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration
29 | ) = NULL;
30 | HRESULT(__stdcall* RealTaskGroupGetTitleText)(void* This, void* taskItem, wchar_t* buffer, int length) = NULL;
31 | void(__stdcall* RealOnStartTaskbarApiSurface)(void* This) = NULL;
32 | void(__stdcall* RealStartLabelAnimation)(void* This, void** pUIElement, float fZero, float fOne) = NULL;
33 |
34 | wchar_t* __stdcall MineGetOverlayIconDescription(void** This)
35 | {
36 | auto storedDescription = (wchar_t*)*(This + 21);
37 | if (!storedDescription)
38 | return (wchar_t*)DummyEmptyString;
39 | else
40 | return storedDescription;
41 | }
42 |
43 | HRESULT __stdcall Mineget_GroupingMode(void** This, int* pGroupingMode)
44 | {
45 | auto baseClass = This + g_nSettings5ToBaseClassDiff;
46 | auto isThisPrimaryTaskbar = !g_bMultiMonEnabled || baseClass == g_pPrimaryTaskbarSettings;
47 | *pGroupingMode = isThisPrimaryTaskbar ? g_dwGroupingMode : g_dwMMGroupingMode;
48 | return S_OK;
49 | }
50 |
51 | HRESULT __stdcall Mineget_ShowLabels(void** This, bool* pShowLabels)
52 | {
53 | *pShowLabels = g_bShowLabels;
54 | return S_OK;
55 | }
56 |
57 | void __stdcall MineTaskbarSettingsInitialize(void** This)
58 | {
59 | RealTaskbarSettingsInitialize(This);
60 |
61 | if (g_pPrimaryTaskbarSettings)
62 | return;
63 |
64 | // Skipping over heap_implements vtable pointer and ref count property
65 | auto pTaskbarSettings = (IUnknown*)(This + 2);
66 | void** pTaskbarSettings5 = nullptr;
67 | auto res = pTaskbarSettings->QueryInterface(IID_ITaskbarSettings5, (void**)&pTaskbarSettings5);
68 | if (res != S_OK)
69 | return;
70 |
71 | g_pPrimaryTaskbarSettings = This;
72 | g_nSettings5ToBaseClassDiff = This - pTaskbarSettings5;
73 |
74 | pTaskbarSettings5 = (void**)*pTaskbarSettings5;
75 | Realget_GroupingMode = (HRESULT(__stdcall*)(void**, int*)) * (pTaskbarSettings5 + 6);
76 | Realget_ShowLabels = (HRESULT(__stdcall*)(void**, bool*)) * (pTaskbarSettings5 + 7);
77 |
78 | DetourTransactionBegin();
79 | DetourUpdateThread(GetCurrentThread());
80 | DetourAttach(&(PVOID&)Realget_GroupingMode, Mineget_GroupingMode);
81 | DetourAttach(&(PVOID&)Realget_ShowLabels, Mineget_ShowLabels);
82 | DetourTransactionCommit();
83 |
84 | pTaskbarSettings->Release();
85 | }
86 |
87 | NTSTATUS NTAPI MineRtlQueryFeatureConfiguration(
88 | _In_ ULONG FeatureId,
89 | _In_ RTL_FEATURE_CONFIGURATION_TYPE FeatureType,
90 | _Inout_ PULONGLONG ChangeStamp,
91 | _In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration
92 | )
93 | {
94 | if (FeatureId != 29785186)
95 | return RealRtlQueryFeatureConfiguration(FeatureId,
96 | FeatureType,
97 | ChangeStamp,
98 | FeatureConfiguration);
99 |
100 | ZeroMemory(FeatureConfiguration, sizeof(RTL_FEATURE_CONFIGURATION));
101 | FeatureConfiguration->FeatureId = FeatureId;
102 | FeatureConfiguration->Priority = 8;
103 | FeatureConfiguration->EnabledState = 2;
104 | *ChangeStamp = 1;
105 | return STATUS_SUCCESS;
106 | }
107 |
108 | HRESULT __stdcall MineTaskGroupGetTitleText(void* This, void* pTaskItem, wchar_t* pText, int dwSize)
109 | {
110 | auto hr = RealTaskGroupGetTitleText(This, pTaskItem, pText, dwSize);
111 | if (hr == E_FAIL)
112 | return ERROR_SUCCESS;
113 | return hr;
114 | }
115 |
116 | void __stdcall MineStartLabelAnimation(void* This, void** pUIElement, float fZero, float fOne)
117 | {
118 | if (*pUIElement != nullptr)
119 | RealStartLabelAnimation(This, pUIElement, fZero, fOne);
120 | }
121 |
122 | void __stdcall MineOnStartTaskbarApiSurface(void* This)
123 | {
124 | RealOnStartTaskbarApiSurface(This);
125 |
126 | if (RealStartLabelAnimation)
127 | return;
128 | HMODULE tbViewMod;
129 | if (!GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, L"Taskbar.View.dll", &tbViewMod))
130 | return;
131 |
132 | auto ntHeader = (PIMAGE_NT_HEADERS)((PBYTE)tbViewMod + ((PIMAGE_DOS_HEADER)tbViewMod)->e_lfanew);
133 | auto codeStart = (PBYTE)ntHeader + ntHeader->OptionalHeader.BaseOfCode;
134 | auto codeLength = ntHeader->OptionalHeader.SizeOfCode;
135 | auto locStartLabelAnimation = FindMasked128BInMemory(codeStart, codeLength, 0x8B48F2280FFB280F, 0x000000E8F98B48DA, -1, 0x000000FFFFFFFFFF, -0x27);
136 | if (locStartLabelAnimation)
137 | {
138 | RealStartLabelAnimation = (void(__stdcall*)(void*, void**, float, float))locStartLabelAnimation;
139 |
140 | DetourTransactionBegin();
141 | DetourUpdateThread(GetCurrentThread());
142 | DetourAttach(&(PVOID&)RealStartLabelAnimation, MineStartLabelAnimation);
143 | DetourTransactionCommit();
144 | }
145 | }
146 |
147 | bool PrefUpdateGroupingMode()
148 | {
149 | return PrefUpdate(L"TaskbarGlomLevel", &g_dwGroupingMode, 0);
150 | }
151 |
152 | bool PrefUpdateMultiMonEnabled()
153 | {
154 | return PrefUpdate(L"MMTaskbarEnabled", &g_bMultiMonEnabled, false);
155 | }
156 |
157 | bool PrefUpdateMMGroupingMode()
158 | {
159 | return PrefUpdate(L"MMTaskbarGlomLevel", &g_dwMMGroupingMode, 0);
160 | }
161 |
162 | bool PrefUpdateShowLabels()
163 | {
164 | return PrefUpdate(L"TaskbarShowLabels", &g_bShowLabels, false);
165 | }
166 |
167 | NTSTATUS NTAPI DxDisplayConfigChangeCallback(
168 | _In_ WNF_STATE_NAME StateName,
169 | _In_ DWORD ChangeStamp,
170 | _In_ PWNF_TYPE_ID TypeId,
171 | _In_opt_ PVOID CallbackContext,
172 | _In_ PVOID Buffer,
173 | _In_ ULONG BufferSize
174 | )
175 | {
176 | g_dwMonitorCount = GetSystemMetrics(SM_CMONITORS);
177 | return STATUS_SUCCESS;
178 | }
179 |
180 | bool IsRegsvr32()
181 | {
182 | wchar_t exePath[MAX_PATH];
183 | DWORD dwLength = MAX_PATH;
184 | QueryFullProcessImageNameW(GetCurrentProcess(), 0, exePath, &dwLength);
185 |
186 | auto exeName = wcsrchr(exePath, '\\');
187 | if (!exeName)
188 | return false;
189 |
190 | if (!_wcsicmp(exeName + 1, L"regsvr32.exe"))
191 | return true;
192 |
193 | return false;
194 | }
195 |
196 | #pragma comment(linker, "/export:DllRegisterServer=_DllRegisterServer,PRIVATE")
197 | STDAPI _DllRegisterServer()
198 | {
199 | DWORD dwLastError = ERROR_SUCCESS;
200 | HKEY hKey = NULL;
201 | DWORD dwSize = 0;
202 | wchar_t wszFilename[MAX_PATH];
203 |
204 | if (!dwLastError)
205 | {
206 | if (!GetModuleFileNameW(g_hModule, wszFilename, MAX_PATH))
207 | {
208 | dwLastError = GetLastError();
209 | }
210 | }
211 | if (!dwLastError)
212 | {
213 | dwLastError = RegCreateKeyExW(
214 | HKEY_CURRENT_USER,
215 | L"SOFTWARE\\Classes\\CLSID\\" TEXT(UX_CLSID) L"\\InProcServer32",
216 | 0,
217 | NULL,
218 | REG_OPTION_NON_VOLATILE,
219 | KEY_WRITE | KEY_WOW64_64KEY,
220 | NULL,
221 | &hKey,
222 | NULL
223 | );
224 | if (hKey == NULL || hKey == INVALID_HANDLE_VALUE)
225 | {
226 | hKey = NULL;
227 | }
228 | if (hKey)
229 | {
230 | dwLastError = RegSetValueExW(
231 | hKey,
232 | NULL,
233 | 0,
234 | REG_SZ,
235 | (PBYTE)wszFilename,
236 | (DWORD)((wcslen(wszFilename) + 1) * sizeof(wchar_t))
237 | );
238 | dwLastError = RegSetValueExW(
239 | hKey,
240 | L"ThreadingModel",
241 | 0,
242 | REG_SZ,
243 | (PBYTE)L"Apartment",
244 | 10 * sizeof(wchar_t)
245 | );
246 | RegCloseKey(hKey);
247 | }
248 | }
249 | if (!dwLastError)
250 | {
251 | dwLastError = RegCreateKeyExW(
252 | HKEY_CURRENT_USER,
253 | L"SOFTWARE\\Classes\\Drive\\shellex\\FolderExtensions\\" TEXT(UX_CLSID),
254 | 0,
255 | NULL,
256 | REG_OPTION_NON_VOLATILE,
257 | KEY_WRITE | KEY_WOW64_64KEY,
258 | NULL,
259 | &hKey,
260 | NULL
261 | );
262 | if (hKey == NULL || hKey == INVALID_HANDLE_VALUE)
263 | {
264 | hKey = NULL;
265 | }
266 | if (hKey)
267 | {
268 | DWORD dwDriveMask = 255;
269 | dwLastError = RegSetValueExW(
270 | hKey,
271 | L"DriveMask",
272 | 0,
273 | REG_DWORD,
274 | (PBYTE)&dwDriveMask,
275 | sizeof(DWORD)
276 | );
277 | RegCloseKey(hKey);
278 | }
279 | }
280 |
281 | return dwLastError == 0 ? S_OK : HRESULT_FROM_WIN32(dwLastError);
282 | }
283 |
284 | #pragma comment(linker, "/export:DllUnregisterServer=_DllUnregisterServer,PRIVATE")
285 | STDAPI _DllUnregisterServer()
286 | {
287 | DWORD dwLastError = ERROR_SUCCESS;
288 | HKEY hKey = NULL;
289 | DWORD dwSize = 0;
290 | wchar_t wszFilename[MAX_PATH];
291 |
292 | if (!dwLastError)
293 | {
294 | if (!GetModuleFileNameW(g_hModule, wszFilename, MAX_PATH))
295 | {
296 | dwLastError = GetLastError();
297 | }
298 | }
299 | if (!dwLastError)
300 | {
301 | dwLastError = RegOpenKeyW(
302 | HKEY_CURRENT_USER,
303 | L"SOFTWARE\\Classes\\CLSID\\" TEXT(UX_CLSID),
304 | &hKey
305 | );
306 | if (hKey == NULL || hKey == INVALID_HANDLE_VALUE)
307 | {
308 | hKey = NULL;
309 | }
310 | if (hKey)
311 | {
312 | dwLastError = RegDeleteTreeW(
313 | hKey,
314 | 0
315 | );
316 | RegCloseKey(hKey);
317 | if (!dwLastError)
318 | {
319 | RegDeleteTreeW(
320 | HKEY_CURRENT_USER,
321 | L"SOFTWARE\\Classes\\CLSID\\" TEXT(UX_CLSID)
322 | );
323 | }
324 | }
325 | }
326 | if (!dwLastError)
327 | {
328 | dwLastError = RegOpenKeyW(
329 | HKEY_CURRENT_USER,
330 | L"SOFTWARE\\Classes\\Drive\\shellex\\FolderExtensions\\" TEXT(UX_CLSID),
331 | &hKey
332 | );
333 | if (hKey == NULL || hKey == INVALID_HANDLE_VALUE)
334 | {
335 | hKey = NULL;
336 | }
337 | if (hKey)
338 | {
339 | dwLastError = RegDeleteTreeW(
340 | hKey,
341 | 0
342 | );
343 | RegCloseKey(hKey);
344 | if (!dwLastError)
345 | {
346 | RegDeleteTreeW(
347 | HKEY_CURRENT_USER,
348 | L"SOFTWARE\\Classes\\Drive\\shellex\\FolderExtensions\\" TEXT(UX_CLSID)
349 | );
350 | }
351 | }
352 | }
353 |
354 | return dwLastError == 0 ? S_OK : HRESULT_FROM_WIN32(dwLastError);
355 | }
356 |
357 | #pragma comment(linker, "/export:DllCanUnloadNow=_DllCanUnloadNow,PRIVATE")
358 | __control_entrypoint(DllExport)
359 | STDAPI _DllCanUnloadNow(void)
360 | {
361 | return g_bLoadedInExplorer ? S_FALSE : S_OK;
362 | }
363 |
364 | #pragma comment(linker, "/export:DllGetClassObject=_DllGetClassObject,PRIVATE")
365 | _Check_return_
366 | STDAPI _DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID FAR* ppv)
367 | {
368 | // Don't attempt to patch if Taskbar already loaded
369 | HMODULE taskbarMod;
370 | if (GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, L"Taskbar.dll", &taskbarMod))
371 | return E_NOINTERFACE;
372 | taskbarMod = LoadLibraryW(L"Taskbar.dll");
373 | if (!taskbarMod)
374 | return E_NOINTERFACE;
375 | g_hTaskbarMod = taskbarMod;
376 |
377 | auto ntHeader = (PIMAGE_NT_HEADERS)((PBYTE)taskbarMod + ((PIMAGE_DOS_HEADER)taskbarMod)->e_lfanew);
378 | auto codeStart = (PBYTE)ntHeader + ntHeader->OptionalHeader.BaseOfCode;
379 | auto codeLength = ntHeader->OptionalHeader.SizeOfCode;
380 |
381 | auto locGetOverlayIconDescription = Find64BInMemory(codeStart, codeLength, 0xC3000000A8818B48, 0);
382 | if (!locGetOverlayIconDescription)
383 | return E_NOINTERFACE;
384 | RealGetOverlayIconDescription = (wchar_t* (__stdcall*)(void**))locGetOverlayIconDescription;
385 |
386 | auto locTaskbarSettingsInitialize = Find64BInMemory(codeStart, codeLength, 0x8B48FF3345F98B48, -0x37);
387 | if (locTaskbarSettingsInitialize)
388 | RealTaskbarSettingsInitialize = (void(__stdcall*)(void**))locTaskbarSettingsInitialize;
389 |
390 | auto locTaskGroupGetTitleText = Find64BInMemory(codeStart, codeLength, 0xE96349FF334530EC, -0x16);
391 | if (locTaskGroupGetTitleText)
392 | RealTaskGroupGetTitleText = (HRESULT(__stdcall*)(void*, void*, wchar_t*, int))locTaskGroupGetTitleText;
393 |
394 | // After this function runs the correct undocked Taskbar.View will be loaded in memory for us
395 | auto locOnStartTaskbarApiSurface = Find64BInMemory(codeStart, codeLength, 0x00000478BAC8B60F, -0x1D);
396 | if (locOnStartTaskbarApiSurface)
397 | {
398 | if (*(uint64_t*)(locOnStartTaskbarApiSurface + 1) == 0xD98B4820EC834857) // RS prologue
399 | locOnStartTaskbarApiSurface -= 4;
400 | else if (*(uint64_t*)locOnStartTaskbarApiSurface != 0x8B4820EC83485340) // NI prologue
401 | locOnStartTaskbarApiSurface = nullptr;
402 | if (locOnStartTaskbarApiSurface)
403 | RealOnStartTaskbarApiSurface = (void(__stdcall*)(void*))locOnStartTaskbarApiSurface;
404 | }
405 |
406 | RealRtlQueryFeatureConfiguration = RtlQueryFeatureConfiguration;
407 |
408 | DetourTransactionBegin();
409 | DetourUpdateThread(GetCurrentThread());
410 | DetourAttach(&(PVOID&)RealGetOverlayIconDescription, MineGetOverlayIconDescription);
411 | if (RealTaskbarSettingsInitialize)
412 | DetourAttach(&(PVOID&)RealTaskbarSettingsInitialize, MineTaskbarSettingsInitialize);
413 | if (RealTaskGroupGetTitleText)
414 | DetourAttach(&(PVOID&)RealTaskGroupGetTitleText, MineTaskGroupGetTitleText);
415 | if (RealOnStartTaskbarApiSurface)
416 | DetourAttach(&(PVOID&)RealOnStartTaskbarApiSurface, MineOnStartTaskbarApiSurface);
417 | DetourAttach(&(PVOID&)RealRtlQueryFeatureConfiguration, MineRtlQueryFeatureConfiguration);
418 | DetourTransactionCommit();
419 |
420 | PrefUpdateGroupingMode();
421 | PrefUpdateMultiMonEnabled();
422 | PrefUpdateMMGroupingMode();
423 | PrefUpdateShowLabels();
424 |
425 | g_cPrefRegWatcher = wil::make_registry_watcher(
426 | HKEY_CURRENT_USER,
427 | L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
428 | false,
429 | [](wil::RegistryChangeKind changeType)
430 | {
431 | if (PrefUpdateShowLabels())
432 | goto SendTrayMessage;
433 |
434 | if (PrefUpdateGroupingMode())
435 | goto SendTrayMessage;
436 |
437 | if (PrefUpdateMultiMonEnabled())
438 | return;
439 |
440 | if (PrefUpdateMMGroupingMode())
441 | {
442 | if (g_bMultiMonEnabled && g_dwMonitorCount > 1)
443 | goto SendTrayMessage;
444 | return;
445 | }
446 |
447 | return;
448 |
449 | SendTrayMessage:
450 | SendNotifyMessageW(HWND_BROADCAST, 0x1Au, NULL, (LPARAM)L"TraySettings");
451 | });
452 |
453 | RtlSubscribeWnfStateChangeNotification(&g_hWnfDisplayChangeSub, WNF_DX_DISPLAY_CONFIG_CHANGE_NOTIFICATION, 0,
454 | DxDisplayConfigChangeCallback, NULL, NULL, NULL, 0);
455 |
456 | g_bLoadedInExplorer = true;
457 |
458 | return E_NOINTERFACE;
459 | }
460 |
461 | BOOL APIENTRY DllMain(HMODULE hModule,
462 | DWORD ul_reason_for_call,
463 | PVOID lpReserved
464 | )
465 | {
466 | switch (ul_reason_for_call)
467 | {
468 | case DLL_PROCESS_ATTACH:
469 | if (!IsDesktopExplorerProcess() && !IsRegsvr32())
470 | return FALSE;
471 | DisableThreadLibraryCalls(hModule);
472 | g_hModule = hModule;
473 | break;
474 | case DLL_THREAD_ATTACH:
475 | case DLL_THREAD_DETACH:
476 | break;
477 | case DLL_PROCESS_DETACH:
478 | if (g_cPrefRegWatcher)
479 | g_cPrefRegWatcher.reset();
480 | if (g_hWnfDisplayChangeSub)
481 | RtlUnsubscribeWnfStateChangeNotification(g_hWnfDisplayChangeSub);
482 | DetourTransactionBegin();
483 | DetourUpdateThread(GetCurrentThread());
484 | if (RealRtlQueryFeatureConfiguration)
485 | DetourDetach(&(PVOID&)RealRtlQueryFeatureConfiguration, MineRtlQueryFeatureConfiguration);
486 | if (RealGetOverlayIconDescription)
487 | DetourDetach(&(PVOID&)RealGetOverlayIconDescription, MineGetOverlayIconDescription);
488 | if (RealTaskbarSettingsInitialize)
489 | DetourDetach(&(PVOID&)RealTaskbarSettingsInitialize, MineTaskbarSettingsInitialize);
490 | if (RealTaskGroupGetTitleText)
491 | DetourDetach(&(PVOID&)RealTaskGroupGetTitleText, MineTaskGroupGetTitleText);
492 | if (Realget_GroupingMode)
493 | DetourDetach(&(PVOID&)Realget_GroupingMode, Mineget_GroupingMode);
494 | if (Realget_ShowLabels)
495 | DetourDetach(&(PVOID&)Realget_ShowLabels, Mineget_ShowLabels);
496 | if (RealOnStartTaskbarApiSurface)
497 | DetourDetach(&(PVOID&)RealOnStartTaskbarApiSurface, MineOnStartTaskbarApiSurface);
498 | if (RealStartLabelAnimation)
499 | DetourDetach(&(PVOID&)RealStartLabelAnimation, MineStartLabelAnimation);
500 | DetourTransactionCommit();
501 | if (g_hTaskbarMod)
502 | FreeLibrary(g_hTaskbarMod);
503 | break;
504 | }
505 | return TRUE;
506 | }
507 |
508 |
--------------------------------------------------------------------------------
/frosting/framework.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
4 | // Windows Header Files
5 | #include
6 |
--------------------------------------------------------------------------------
/frosting/frosting.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thebookisclosed/ShellFrosting/714742776132d338c6140d6ff894a940b47737a8/frosting/frosting.rc
--------------------------------------------------------------------------------
/frosting/frosting.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 16.0
23 | Win32Proj
24 | {0314f3e4-1980-4ff4-9cbd-f8b6da4608e0}
25 | frosting
26 | 10.0
27 |
28 |
29 |
30 | DynamicLibrary
31 | true
32 | v143
33 | Unicode
34 |
35 |
36 | DynamicLibrary
37 | false
38 | v143
39 | true
40 | Unicode
41 |
42 |
43 | DynamicLibrary
44 | true
45 | v143
46 | Unicode
47 |
48 |
49 | DynamicLibrary
50 | false
51 | v143
52 | true
53 | Unicode
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | Level3
76 | true
77 | WIN32;_DEBUG;FROSTING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
78 | true
79 | Use
80 | pch.h
81 |
82 |
83 | Windows
84 | true
85 | false
86 |
87 |
88 |
89 |
90 | Level3
91 | true
92 | true
93 | true
94 | WIN32;NDEBUG;FROSTING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
95 | true
96 | Use
97 | pch.h
98 |
99 |
100 | Windows
101 | true
102 | true
103 | true
104 | false
105 |
106 |
107 |
108 |
109 | Level3
110 | true
111 | _DEBUG;FROSTING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
112 | true
113 | Use
114 | pch.h
115 | stdcpp17
116 | $(ProjectDir)int\include;$(ProjectDir)vnd\Detours\include;$(ProjectDir)vnd\wil\include;%(AdditionalIncludeDirectories)
117 | MultiThreadedDebug
118 |
119 |
120 | Windows
121 | true
122 | false
123 | $(ProjectDir)int\lib.$(Platform);$(ProjectDir)vnd\Detours\lib.$(Platform);%(AdditionalLibraryDirectories)
124 |
125 |
126 | call "$(ProjectDir)int\def2lib.cmd" $(Platform)
127 |
128 |
129 |
130 |
131 | Level3
132 | true
133 | true
134 | true
135 | NDEBUG;FROSTING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
136 | true
137 | Use
138 | pch.h
139 | stdcpp17
140 | MultiThreaded
141 | $(ProjectDir)int\include;$(ProjectDir)vnd\Detours\include;$(ProjectDir)vnd\wil\include;%(AdditionalIncludeDirectories)
142 |
143 |
144 | Windows
145 | true
146 | true
147 | true
148 | false
149 | $(ProjectDir)int\lib.$(Platform);$(ProjectDir)vnd\Detours\lib.$(Platform);%(AdditionalLibraryDirectories)
150 |
151 |
152 | call "$(ProjectDir)int\def2lib.cmd" $(Platform)
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 | Create
170 | Create
171 | Create
172 | Create
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
--------------------------------------------------------------------------------
/frosting/frosting.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Header Files
20 |
21 |
22 | Header Files
23 |
24 |
25 | Header Files
26 |
27 |
28 | Header Files
29 |
30 |
31 | Header Files
32 |
33 |
34 | Header Files
35 |
36 |
37 | Header Files
38 |
39 |
40 | Header Files
41 |
42 |
43 |
44 |
45 | Source Files
46 |
47 |
48 | Source Files
49 |
50 |
51 | Source Files
52 |
53 |
54 | Source Files
55 |
56 |
57 |
58 |
59 | Resource Files
60 |
61 |
62 |
--------------------------------------------------------------------------------
/frosting/int/def/ntdllex.def:
--------------------------------------------------------------------------------
1 | LIBRARY NTDLL
2 | EXPORTS
3 | RtlQueryFeatureConfiguration
4 | RtlSubscribeWnfStateChangeNotification
5 | RtlUnsubscribeWnfStateChangeNotification
6 |
--------------------------------------------------------------------------------
/frosting/int/def/shell32ex.def:
--------------------------------------------------------------------------------
1 | LIBRARY shell32
2 | EXPORTS
3 | IsDesktopExplorerProcess
4 |
--------------------------------------------------------------------------------
/frosting/int/def2lib.cmd:
--------------------------------------------------------------------------------
1 | pushd "%~dp0"
2 | if not exist lib.%1 md lib.%1
3 | call :ensureLib %1 ntdllex
4 | call :ensureLib %1 shell32ex
5 | popd
6 | goto:EOF
7 |
8 | :ensureLib
9 | if not exist lib.%1\%2.lib lib /def:def\%2.def /machine:%1 /out:lib.%1\%2.lib
--------------------------------------------------------------------------------
/frosting/int/include/ntdllex.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #pragma comment(lib, "ntdllex.lib")
3 | typedef enum _RTL_FEATURE_CONFIGURATION_TYPE
4 | {
5 | RtlFeatureConfigurationBoot = 0,
6 | RtlFeatureConfigurationRuntime = 1,
7 | RtlFeatureConfigurationCount = 2
8 | } RTL_FEATURE_CONFIGURATION_TYPE, * PRTL_FEATURE_CONFIGURATION_TYPE;
9 |
10 | typedef struct _RTL_FEATURE_CONFIGURATION
11 | {
12 | unsigned int FeatureId;
13 | struct
14 | {
15 | unsigned int Priority : 4;
16 | unsigned int EnabledState : 2;
17 | unsigned int IsWexpConfiguration : 1;
18 | unsigned int HasSubscriptions : 1;
19 | unsigned int Variant : 6;
20 | unsigned int VariantPayloadKind : 2;
21 | };
22 | unsigned int VariantPayload;
23 | } RTL_FEATURE_CONFIGURATION, * PRTL_FEATURE_CONFIGURATION;
24 |
25 | typedef struct _WNF_STATE_NAME
26 | {
27 | unsigned long Data[2];
28 | } WNF_STATE_NAME, * PWNF_STATE_NAME;
29 |
30 | typedef struct _WNF_TYPE_ID
31 | {
32 | struct _GUID TypeId;
33 | } WNF_TYPE_ID, * PWNF_TYPE_ID;
34 |
35 | typedef NTSTATUS(NTAPI* PWNF_USER_CALLBACK)(
36 | _In_ WNF_STATE_NAME StateName,
37 | _In_ DWORD ChangeStamp,
38 | _In_ PWNF_TYPE_ID TypeId,
39 | _In_opt_ PVOID CallbackContext,
40 | _In_ PVOID Buffer,
41 | _In_ ULONG BufferSize
42 | );
43 |
44 | extern "C" __declspec(dllimport) NTSTATUS NTAPI RtlQueryFeatureConfiguration(_In_ ULONG FeatureId,
45 | _In_ RTL_FEATURE_CONFIGURATION_TYPE FeatureType,
46 | _Inout_ PULONGLONG ChangeStamp,
47 | _In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration
48 | );
49 |
50 | extern "C" __declspec(dllimport) NTSTATUS NTAPI RtlSubscribeWnfStateChangeNotification(
51 | _Outptr_ PVOID * SubscriptionHandle,
52 | _In_ WNF_STATE_NAME StateName,
53 | _In_ DWORD ChangeStamp,
54 | _In_ PWNF_USER_CALLBACK Callback,
55 | _In_opt_ PVOID CallbackContext,
56 | _In_opt_ PWNF_TYPE_ID TypeId,
57 | _In_opt_ ULONG SerializationGroup,
58 | _Reserved_ ULONG Flags
59 | );
60 |
61 | extern "C" __declspec(dllimport) NTSTATUS NTAPI RtlUnsubscribeWnfStateChangeNotification(
62 | _In_ PVOID SubscriptionHandle
63 | );
--------------------------------------------------------------------------------
/frosting/int/include/shell32ex.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #pragma comment(lib, "shell32ex.lib")
3 | extern "C" __declspec(dllimport) bool __stdcall IsDesktopExplorerProcess();
--------------------------------------------------------------------------------
/frosting/memfind.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include
3 | #include "memfind.h"
4 |
5 | uint8_t* Find64BInMemory(uint8_t* startAddress, uint32_t length, uint64_t pattern, int fixup)
6 | {
7 | auto firstPatternByte = (uint8_t)pattern;
8 | for (auto i = 0u; i < length; i++)
9 | {
10 | auto offsetPtr = startAddress + i;
11 | if (*offsetPtr == firstPatternByte && *(uint64_t*)offsetPtr == pattern)
12 | return offsetPtr + fixup;
13 | }
14 | return NULL;
15 | }
16 |
17 | uint8_t* FindMasked128BInMemory(
18 | uint8_t* startAddress, uint32_t length,
19 | uint64_t hiPattern, uint64_t loPattern,
20 | uint64_t hiMask, uint64_t loMask, int fixup)
21 | {
22 | auto firstPatternByte = (uint8_t)hiPattern;
23 | for (auto i = 0u; i < length; i++)
24 | {
25 | auto offsetPtr = startAddress + i;
26 | if (*offsetPtr == firstPatternByte)
27 | {
28 | auto offsetPtr64 = (uint64_t*)offsetPtr;
29 | if ((*offsetPtr64 & hiMask) == hiPattern && (*(offsetPtr64 + 1) & loMask) == loPattern)
30 | return offsetPtr + fixup;
31 | }
32 |
33 | }
34 | return NULL;
35 | }
--------------------------------------------------------------------------------
/frosting/memfind.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | uint8_t* Find64BInMemory(uint8_t* startAddress, uint32_t length, uint64_t pattern, int fixup);
3 |
4 | uint8_t* FindMasked128BInMemory(
5 | uint8_t* startAddress, uint32_t length,
6 | uint64_t hiPattern, uint64_t loPattern,
7 | uint64_t hiMask, uint64_t loMask, int fixup);
--------------------------------------------------------------------------------
/frosting/pch.cpp:
--------------------------------------------------------------------------------
1 | // pch.cpp: source file corresponding to the pre-compiled header
2 |
3 | #include "pch.h"
4 |
5 | // When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
6 |
--------------------------------------------------------------------------------
/frosting/pch.h:
--------------------------------------------------------------------------------
1 | // pch.h: This is a precompiled header file.
2 | // Files listed below are compiled only once, improving build performance for future builds.
3 | // This also affects IntelliSense performance, including code completion and many code browsing features.
4 | // However, files listed here are ALL re-compiled if any one of them is updated between builds.
5 | // Do not add files here that you will be updating frequently as this negates the performance advantage.
6 |
7 | #ifndef PCH_H
8 | #define PCH_H
9 |
10 | // add headers that you want to pre-compile here
11 | #include "framework.h"
12 |
13 | #endif //PCH_H
14 |
--------------------------------------------------------------------------------
/frosting/preferencefx.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "preferencefx.h"
3 |
4 | DWORD RegDWORDPrefGet(LPCWSTR lpValue, DWORD dwFallback)
5 | {
6 | DWORD dwSize = sizeof(DWORD);
7 | DWORD dwVal = dwFallback;
8 | RegGetValueW(
9 | HKEY_CURRENT_USER,
10 | L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
11 | lpValue,
12 | RRF_RT_REG_DWORD,
13 | NULL,
14 | &dwVal,
15 | &dwSize);
16 | return dwVal;
17 | }
18 |
19 | template
20 | bool PrefUpdate(LPCWSTR lpPrefName, T* pPref, T fallback) {
21 | auto newPref = (T)RegDWORDPrefGet(lpPrefName, fallback);
22 | if (newPref == *pPref)
23 | return false;
24 |
25 | *pPref = newPref;
26 | return true;
27 | }
28 |
29 | // I love C++
30 | template bool PrefUpdate(LPCWSTR lpPrefName, bool* pPref, bool fallback);
31 | template bool PrefUpdate(LPCWSTR lpPrefName, int* pPref, int fallback);
32 |
--------------------------------------------------------------------------------
/frosting/preferencefx.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | DWORD RegDWORDPrefGet(LPCWSTR lpValue, DWORD dwFallback);
3 |
4 | template
5 | bool PrefUpdate(LPCWSTR lpPrefName, T* pPref, T fallback);
--------------------------------------------------------------------------------
/frosting/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by frosting.rc
4 |
5 | // Next default values for new objects
6 | //
7 | #ifdef APSTUDIO_INVOKED
8 | #ifndef APSTUDIO_READONLY_SYMBOLS
9 | #define _APS_NEXT_RESOURCE_VALUE 101
10 | #define _APS_NEXT_COMMAND_VALUE 40001
11 | #define _APS_NEXT_CONTROL_VALUE 1001
12 | #define _APS_NEXT_SYMED_VALUE 101
13 | #endif
14 | #endif
15 |
--------------------------------------------------------------------------------