Skip to content

Commit

Permalink
chore: drop support for Windows 7 / 8 / 8.1 (electron#36427)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update docs/breaking-changes.md

Co-authored-by: Keeley Hammond <[email protected]>

* fix breaking-changes.md

* chore: note last supported version

Co-authored-by: Jeremy Rose <[email protected]>

* chore: add link to deprecation policy

* Update docs/breaking-changes.md

Co-authored-by: Jeremy Rose <[email protected]>

* update README.md

Co-authored-by: Milan Burda <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <[email protected]>
Co-authored-by: Keeley Hammond <[email protected]>
Co-authored-by: Jeremy Rose <[email protected]>
  • Loading branch information
6 people authored Dec 1, 2022
1 parent 4ff0642 commit eb29148
Show file tree
Hide file tree
Showing 34 changed files with 64 additions and 2,607 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For more installation options and troubleshooting tips, see
Each Electron release provides binaries for macOS, Windows, and Linux.

* macOS (High Sierra and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11.
* Windows (Windows 7 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8.
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7 and 8 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
* Ubuntu 14.04 and newer
* Fedora 24 and newer
Expand Down
6 changes: 6 additions & 0 deletions docs/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ This document uses the following convention to categorize breaking changes:

## Planned Breaking API Changes (23.0)

### Removed: Windows 7 / 8 / 8.1 support

[Windows 7, Windows 8, and Windows 8.1 are no longer supported](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice). Electron follows the planned Chromium deprecation policy, which will [deprecate Windows 7 support beginning in Chromium 109](https://support.google.com/chrome/thread/185534985/sunsetting-support-for-windows-7-8-8-1-in-early-2023?hl=en).

Older versions of Electron will continue to run on these operating systems, but Windows 10 or later will be required to run Electron v23.0.0 and higher.

### Removed: BrowserWindow `scroll-touch-*` events

The deprecated `scroll-touch-begin`, `scroll-touch-end` and `scroll-touch-edge`
Expand Down
11 changes: 0 additions & 11 deletions docs/tutorial/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ Start Menu. This can be overkill during development, so adding
trick. Navigate to the file in Explorer, right-click and 'Pin to Start Menu'.
You will then need to add the line `app.setAppUserModelId(process.execPath)` to
your main process to see notifications.
* On Windows 8.1 and Windows 8, a shortcut to your app with an [Application User
Model ID][app-user-model-id] must be installed to the Start screen. Note,
however, that it does not need to be pinned to the Start screen.
* On Windows 7, notifications work via a custom implementation which visually
resembles the native one on newer systems.

Electron attempts to automate the work around the Application User Model ID. When
Electron is used together with the installation and update framework Squirrel,
Expand All @@ -92,12 +87,6 @@ Electron will detect that Squirrel was used and will automatically call
`app.setAppUserModelId()` with the correct value. During development, you may have
to call [`app.setAppUserModelId()`][set-app-user-model-id] yourself.

Furthermore, in Windows 8, the maximum length for the notification body is 250
characters, with the Windows team recommending that notifications should be kept
to 200 characters. That said, that limitation has been removed in Windows 10, with
the Windows team asking developers to be reasonable. Attempting to send gigantic
amounts of text to the API (thousands of characters) might result in instability.

#### Advanced Notifications

Later versions of Windows allow for advanced notifications, with custom templates,
Expand Down
11 changes: 0 additions & 11 deletions filenames.gni
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ filenames = {
"shell/browser/native_window_views_win.cc",
"shell/browser/notifications/win/notification_presenter_win.cc",
"shell/browser/notifications/win/notification_presenter_win.h",
"shell/browser/notifications/win/notification_presenter_win7.cc",
"shell/browser/notifications/win/notification_presenter_win7.h",
"shell/browser/notifications/win/win32_desktop_notifications/common.h",
"shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc",
"shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h",
"shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc",
"shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h",
"shell/browser/notifications/win/win32_desktop_notifications/toast.cc",
"shell/browser/notifications/win/win32_desktop_notifications/toast.h",
"shell/browser/notifications/win/win32_notification.cc",
"shell/browser/notifications/win/win32_notification.h",
"shell/browser/notifications/win/windows_toast_notification.cc",
"shell/browser/notifications/win/windows_toast_notification.h",
"shell/browser/relauncher_win.cc",
Expand Down
1 change: 0 additions & 1 deletion patches/chromium/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ render_widget_host_view_base.patch
render_widget_host_view_mac.patch
webview_cross_drag.patch
gin_enable_disable_v8_platform.patch
disable-redraw-lock.patch
enable_reset_aspect_ratio.patch
boringssl_build_gn.patch
pepper_plugin_support.patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ index 58c13ba42464553427584a98492fe11a4228e3ff..034134fea43ae7c88232e3969e2efcf8
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index aacb580a7506f2c86769251ad00d8679870a454a..400278ab26a4e095fd837fcf84c952a1297b173d 100644
index 51e0b265a17b6d94c078e5ed6b4f74b7b2733a56..ba974126505603fdf3a60c3bfe2cb6ad794537ba 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3140,15 +3140,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3131,15 +3131,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
SetMsgHandled(FALSE);
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.
Expand All @@ -60,10 +60,10 @@ index aacb580a7506f2c86769251ad00d8679870a454a..400278ab26a4e095fd837fcf84c952a1
}

diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
index 233dd12f86c20a7f5169caab998993f614e8bc7e..3bf6fc95a653f1783510378ffeef5b18da42e559 100644
index 08e46c7b92f6cbe95c9cb524d09a6ed9e89ecf00..9de0b0d61f1ef2d0f02a53fa07a6e8f66cfad755 100644
--- a/ui/views/win/hwnd_message_handler_delegate.h
+++ b/ui/views/win/hwnd_message_handler_delegate.h
@@ -258,6 +258,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
@@ -256,6 +256,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
// Called when the window scale factor has changed.
virtual void HandleWindowScaleFactorChanged(float window_scale_factor) = 0;

Expand Down
78 changes: 0 additions & 78 deletions patches/chromium/disable-redraw-lock.patch

This file was deleted.

4 changes: 2 additions & 2 deletions patches/chromium/enable_reset_aspect_ratio.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ index 7fe6a03afbaf219841f65646e3a7b7d4b17bd5ee..2c29c97e36a10eaf25146b359c9172f3
aspect_ratio.height());
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 472090adb19411366c50ed8e5a2f1276bc0a47eb..9f2b240b0c053a10d4543f0ffb9809fd735d7b6d 100644
index ec39cb0d15c80f051e89bf4d0f05368dff897fa7..5678d2ace3c1c05fbf2c17233d7bfc9ed7d3ca99 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1007,8 +1007,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -1002,8 +1002,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
}

void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/fix_aspect_ratio_with_max_size.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
BrowserWindow.

diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 9f2b240b0c053a10d4543f0ffb9809fd735d7b6d..aacb580a7506f2c86769251ad00d8679870a454a 100644
index 5678d2ace3c1c05fbf2c17233d7bfc9ed7d3ca99..51e0b265a17b6d94c078e5ed6b4f74b7b2733a56 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3707,6 +3707,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
@@ -3698,6 +3698,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
min_window_size = delegate_->DIPToScreenSize(min_window_size);
max_window_size = delegate_->DIPToScreenSize(max_window_size);
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/fix_remove_caption-removing_style_call.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
for opaque frameless windows even with that block commented out.

diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 400278ab26a4e095fd837fcf84c952a1297b173d..55afa69870f27b877826ea8a442ab20a8b336d74 100644
index ba974126505603fdf3a60c3bfe2cb6ad794537ba..a063f0d77c6c475e226aeee49e9efa8957021779 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1731,7 +1731,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
@@ -1722,7 +1722,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
0);

Expand Down
1 change: 0 additions & 1 deletion patches/node/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ fix_crypto_tests_to_run_with_bssl.patch
fix_account_for_debugger_agent_race_condition.patch
repl_fix_crash_when_sharedarraybuffer_disabled.patch
fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch
fix_crash_caused_by_gethostnamew_on_windows_7.patch
fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch
fix_serdes_test.patch
darwin_bump_minimum_supported_version_to_10_15_3406.patch
Expand Down
Loading

0 comments on commit eb29148

Please sign in to comment.