chore: drop support for Windows 7 / 8 / 8.1 (#36427)

* chore: drop support for Windows 7 & 8

* chore: remove disable-redraw-lock.patch

* chore: update patches

* Update docs/breaking-changes.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update docs/breaking-changes.md

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

* fix breaking-changes.md

* chore: note last supported version

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* chore: add link to deprecation policy

* Update docs/breaking-changes.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* update README.md

Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
Milan Burda 2022-12-01 02:13:29 +01:00 committed by GitHub
parent 4ff0642af7
commit eb291485bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 63 additions and 2606 deletions

View file

@ -361,23 +361,11 @@ bool MoveItemToTrashWithError(const base::FilePath& path,
// Elevation prompt enabled for UAC protected files. This overrides the
// SILENT, NO_UI and NOERRORUI flags.
if (base::win::GetVersion() >= base::win::Version::WIN8) {
// Windows 8 introduces the flag RECYCLEONDELETE and deprecates the
// ALLOWUNDO in favor of ADDUNDORECORD.
if (FAILED(pfo->SetOperationFlags(
FOF_NO_UI | FOFX_ADDUNDORECORD | FOF_NOERRORUI | FOF_SILENT |
FOFX_SHOWELEVATIONPROMPT | FOFX_RECYCLEONDELETE))) {
*error = "Failed to set operation flags";
return false;
}
} else {
// For Windows 7 and Vista, RecycleOnDelete is the default behavior.
if (FAILED(pfo->SetOperationFlags(FOF_NO_UI | FOF_ALLOWUNDO |
FOF_NOERRORUI | FOF_SILENT |
FOFX_SHOWELEVATIONPROMPT))) {
*error = "Failed to set operation flags";
return false;
}
if (FAILED(pfo->SetOperationFlags(
FOF_NO_UI | FOFX_ADDUNDORECORD | FOF_NOERRORUI | FOF_SILENT |
FOFX_SHOWELEVATIONPROMPT | FOFX_RECYCLEONDELETE))) {
*error = "Failed to set operation flags";
return false;
}
// Create an IShellItem from the supplied source path.