* fix: apply setContentProtection() in Windows remote sessions again
Chromium stopped excluding windows from capture in remote sessions so that
its own Picture-in-Picture windows stay visible to the remote user
(https://chromium-review.googlesource.com/c/chromium/src/+/7918332). The
same code path backs setContentProtection(), so since Electron 44 the call
has silently done nothing over Remote Desktop while isContentProtected()
kept returning true. Enable the feature that lifts the restriction by
default, and document the effect on remote users and how to opt out.
* docs: note when setContentProtection() takes effect on Windows
SetWindowDisplayAffinity is applied by the next DWM composition. Measured on
Windows 11 24H2, the first frame without the window was presented 9-42ms after
the call, and a capture started within about 11ms could still contain it.
The XShape request that setIgnoreMouseEvents() issues on X11 stayed in the
client-side output buffer until the UI thread next returned to its message
loop, so the window kept receiving (or kept ignoring) mouse events for as
long as the caller stayed busy. Round-trip to the server after updating the
region. A flush alone only writes the request to the socket; the server
gives no ordering guarantee between clients, so only a reply shows that the
shape is in place before another client's next request is processed.
Since the 43 frame-view refactor the tree host's frame-hint pass resets the
window input region on every bounds, state and theme change, which undid
the X11 input shape that setIgnoreMouseEvents(true) had set directly. Keep
the ignore state on the window and apply it from the frame-hint pass
through PlatformWindow::SetInputRegion instead. That path is implemented
for Wayland toplevels as well, so the call now also works there.
* build: check the formatting of docs code blocks with oxfmt
lint-roller 4 splits the old `lint-roller-markdown-standard` into an
oxlint half and an oxfmt half. This wires up the second one:
`lint:fmt-in-markdown` runs `lint-roller-markdown-oxfmt` over docs/ as
part of `lint:docs`, using docs/.oxfmtrc.json, which matches the repo's
.oxfmtrc.json except that docs snippets keep their semicolon-free style.
`--fix` writes the formatted blocks back, and a block can opt out with
`@noformat` in its info string.
* docs: format code blocks with oxfmt
Result of `lint-roller-markdown-oxfmt --fix` with docs/.oxfmtrc.json, plus
the @ts-expect-error line anchors (and one Docusaurus highlight marker)
that moved with the reformat. The Babel output sample in the ESM guide and
the two excerpts of repo source in creating-api.md are marked @noformat,
and the contentTracing example passes an async callback instead of
wrapping an IIFE so that it does not need a leading semicolon.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Accessing most members of a destroyed window throws `Object has been
destroyed`, but nothing in the docs said so. Note it on
`BaseWindow.isDestroyed()`, since it applies to the class as a whole, and
point at that guard from `BrowserWindow.webContents`.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: encode JPEGs from images without a 1x representation
nativeImage.toJPEG() returned an empty buffer for any image whose only
representation had a scale factor other than 1, because the 1x JPEG encoder
refuses those. Fall back to encoding the closest representation.
* fix: give captured page images their device scale factor
capturePage(), the offscreen paint event and beginFrameSubscription() marked
their images as 1x regardless of the scale the page was rendered at, so on a
HiDPI display, or with offscreen.deviceScaleFactor, getSize() reported pixels
instead of DIPs. Mark each image with the view's device scale factor.
* docs: add API history for the captured image scale factor change
* docs: document setAlwaysOnTop and isAlwaysOnTop Wayland limitations
Add "Not supported on Wayland (Linux)" notes to setAlwaysOnTop(),
isAlwaysOnTop(), and the alwaysOnTop constructor option in both
BaseWindow and BrowserWindow docs. The Wayland protocol does not
provide a way for applications to control window z-order, so these
APIs have no effect under Wayland compositors. X11 mode still works
via --ozone-platform=x11.
Also adds a breaking-changes entry under 43.0 for visibility to
app developers who may be affected by this platform limitation.
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
* docs: simplify wayland always-on-top limitation notes per review
Remove breaking-changes.md entry since this is a documentation-only
change, not a behavior change. Keep concise "Not supported on Wayland
(Linux)." annotations matching existing doc patterns.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add setAccentColor on Windows
* refactor: unify GetSystemAccentColor
* refactor: remove redundant parsing
* chore: fixup documentation
* Update docs/api/browser-window.md
Co-authored-by: Will Anderson <andersonw@dropbox.com>
* Update docs/api/base-window.md
Co-authored-by: Will Anderson <andersonw@dropbox.com>
---------
Co-authored-by: Will Anderson <andersonw@dropbox.com>
* test: add platform test on visibleOnAllWorkspaces tests
visibleOnAllWorkspaces is not supported on Windows
* test: do not skip visibleOnAllWorkspaces tests on Windows
That feature is supported on Linux, so move the test from the
"window states (excluding Linux)" section into the
"window states" section.
* fix: nested it() calls in visibleOnAllWorkspaces specs
* chore: make the process.platform test simpler
* fix: tests that were not run in api-app-spec due to nested it()
* fix: tests that were not run in api-browser-window-spec due to nested it()
* chore: annotate disabled test
* fix: enable `autoHideMenuBar` tests on Linux and Windows (#46818)
* fix: enable autoHideMenuBar tests
* docs: mark autoHideMenuBar as supported on Linux, Windows
* feat: add query-session-end event for Windows
* fix: remove debug line
* feat: notify with reason on session-end
* docs: add comments and return params
* docs: add same docs to the BrowserWindow
* fix: add shutdown reason if lParam == 0
* docs: remove 'force' word
* docs: revert multithreading.md change
* docs: add reasons documentation, reason variable renamed to reasons
* docs: improve 'shutdown' reason wording
* docs: reword with 'can be'
* fix: pass reasons by reference
* fix: use newer approach which expose reasons value directly on Event object
* docs: add escaping
* style: linter fixes
* fix: project now should compile
* fix: EmitWithoutEvent method added, EmitWithEvent moved to private again
* docs: typo fix
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
* docs: dedicated WindowSessionEndEvent type created
* docs: better wording for session-end event description
Co-authored-by: Will Anderson <will@itsananderson.com>
---------
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Will Anderson <will@itsananderson.com>
* chore: bump chromium in DEPS to 117.0.5846.0
* chore: update patches
* 4628901: Bump the macOS deployment target to 10.15
https://chromium-review.googlesource.com/c/chromium/src/+/4628901
* 4593350: [Private Network Access] Trigger Permission Prompt
https://chromium-review.googlesource.com/c/chromium/src/+/4593350
* 4631011: Remove unlaunched "InstallReplacementAndroidApp" Platform App APIs
https://chromium-review.googlesource.com/c/chromium/src/+/4631011
* chore: disable API deprecation warnings in NSKeyedArchiver
* chore: update libcxx filenames
* chore: bump chromium in DEPS to 117.0.5848.2
* chore: update feat_add_set_theme_source_to_allow_apps_to.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629743
No manual changes; patch succeeded with fuzz
* chore: update process_singleton.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4605398
Trivial manual patch adjustments to account for code shear.
* chore: remove electron::BrowserContext::GetMediaDeviceIDSalt()
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4608130
upstream tldr:
- content::BrowserContext::GetMediaDeviceIDSalt()
- content::ContentBrowserClient::ArePersistentMediaDeviceIDsAllowed()
+ content::ContentBrowserClient::GetMediaDeviceIDSalt()
This commit leaves ElectronBrowserContext::GetMediaDeviceIDSalt() in
place (now non-virtual, non-override). It is now called by the new
function ElectronBrowserClient::GetMediaDeviceIDSalt().
As a followup, we might want to consider using the new upstream
media_device_salt::MediaDeviceSaltService and removing our
electron::MediaDeviceIDSalt code. CC @MarshallOfSound for 2nd
opinion since he has done the most work on MediaDeviceIDSalt and
may have more context.
* chore: fix iwyu breakage
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629624
electron_browser_main_parts.cc uses ui::ColorProviderManager but didn't
include it. Things worked anyway because we got it indirectly from
content/public/browser/web_contents.h until 4629624.
* chore: remove call to base::mac::IsAtLeastOS10_14
upstream has bumped minimum version to 10.15 so this call is moot?
* chore: remove obsolete API_AVAILABLE calls in IAP
upstream has bumped minimum version to 10.15 so this call is moot?
* chore: remove obsolete API_AVAILABLE calls in electron_application_delegate
upstream has bumped minimum version to 10.15 so this call is moot?
* chore: remove broken-before-macOS-10.15 patch in mas_avoid_usage_of_private_macos_apis.patch
Upstream has bumped minimum to macOS 10.15
* chore: remove @available(macOS 10.14) check
Upstream minimum requirement for macOS is now 10.15
* chore: update patches
* chore: bump chromium in DEPS to 117.0.5850.0
* chore: update patches
* chore: bump chromium in DEPS to 117.0.5852.0
* chore: update patches
* Move two params from NetworkContextParams to NetworkContextFilePaths.
https://chromium-review.googlesource.com/c/chromium/src/+/4615930
* WebUSB: Add exclusionFilters to USBRequestDeviceOptions
https://chromium-review.googlesource.com/c/chromium/src/+/4614682
* Convert /chrome/browser/ui to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4615920
* fixup! Bump the macOS deployment target to 10.15
* fixup! Bump the macOS deployment target to 10.15
* chore: update libcxx files
* win: Remove 10Glass from Windows10Glass function and var names
https://chromium-review.googlesource.com/c/chromium/src/+/4641314
* chore: revert 392e5f43 from chromium
* Add an ExecutionContext to ScriptState
https://chromium-review.googlesource.com/c/chromium/src/+/4609446
* fixup! Add an ExecutionContext to ScriptState
* chore: fix header
* Revert "chore: revert 392e5f43 from chromium"
This reverts commit b7f782943e4ce83cae8cd35780d8d3618cf0772c.
* fix: return correct min/max sizes in WinFrameView
* fixup! Revert chore: revert 392e5f43 from chromium
* fixup! Add an ExecutionContext to ScriptState
* Revert "fixup! Revert chore: revert 392e5f43 from chromium"
This reverts commit 7e2c7281abfc4f309255339fdba073d90a9ae3eb.
* Revert "fix: return correct min/max sizes in WinFrameView"
This reverts commit 3f418b1ab5155686730e087ae6cabe4a21b4bb61.
* Revert "Revert "chore: revert 392e5f43 from chromium""
This reverts commit 56296d8b7c434147e032e3c3b08c0e371b6c27ba.
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>