valinet / Win11DisableRoundedCorners

A simple utility that cold patches dwm (uDWM.dll) in order to disable window rounded corners in Windows 11
GNU General Public License v2.0
828 stars 41 forks source link

Separate Applying and Restoring to different executables. #63

Open TheJaredWilcurt opened 1 day ago

TheJaredWilcurt commented 1 day ago

Problem

In this, very long issue:

Everyone is running into the same problem.

  1. Run the exe, works great
  2. Windows forces you to do updates
  3. Upon rebooting, the patched file is unpatched, causing rounded corners to return
  4. Try re-running the executable, it fails because a .bak file exists
  5. Manually delete a file from system32 (fun)
  6. Re-run the executable and it works now.

Solution

Instead of shipping just one executable:

Ship 2 separate executables:

This will avoid many issues in the future, including the current one.

It puts all the power into the hands of the users to pick what their intent is very clearly.

Should simplify code, as you have two simple tasks to do, instead of having to "guess" what the user wants.

TheJaredWilcurt commented 1 day ago

I'm also cool with it always disabling rounded corners every time it is ran, unless you pass in a -restore argument, as seen in this PR: