802 Commits
Author SHA1 Message Date
知寂andErick Zhao c3bb59f979 docs: add UIPI note for setIgnoreMouseEvents forward option (#53026)
* docs: UIPI note for setIgnoreMouseEvents forward

* chore: spell UIPI

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

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-10-19 11:44:45 -04:00
Shelley Vohr 8af22fd094 fix: apply setContentProtection() in Windows remote sessions again (#54492)
* 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.
2026-09-28 10:02:25 +02:00
Shelley Vohr 4205b3641d fix: apply the X11 input shape before setIgnoreMouseEvents() returns (#54487)
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.
2026-09-28 08:01:59 +02:00
Shelley Vohr ccf74d5fc6 fix: keep setIgnoreMouseEvents(true) in effect on Linux and support it on Wayland (#54375)
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.
2026-09-25 09:10:58 -07:00
Samuel AttardandClaude ad3a896a52 build: check the formatting of docs code blocks with oxfmt (#54140)
* 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>
2026-09-21 00:18:37 -07:00
mochang2andClaude Opus 5 675f036bc0 docs: document accessing a destroyed window (#53894)
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>
2026-09-18 10:32:19 -07:00
Samuel Attard 620193d518 fix: give captured page images their device scale factor (#53813)
* 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
2026-09-10 17:26:16 -04:00
Mitchell Cohen 37f44ca55d feat: re-add app.setBadgeCount and win.setProgressBar for Linux (#52739) 2026-08-16 23:10:01 -07:00
Athul Iddya 580db609e2 feat: support win.setOpacity on Linux (#51455)
Assisted-By: Claude Opus 4.7, Claude Code
2026-06-08 17:49:42 -04:00
Asish KumarandClaude Opus 4.6 eef26c3a59 docs: document setAlwaysOnTop and isAlwaysOnTop Wayland limitations (#50560)
* 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>
2026-06-08 16:13:50 -04:00
Michaela Laurencin 2c526cbec4 docs: add Wayland note for minimize event (#51786)
* add minimize event wayland note

* add minimize event wayland note to browser window

* fix WCO typo in web contents

* fix WCO typo in chore_modify_chromium_handling_of_mouse_events.patch
2026-05-28 14:32:22 -05:00
Mitchell Cohen 675f9fc50b chore!: remove Unity service and Unity-specific APIs (#51649)
chore: remove Unity service and Unity-specific APIs
2026-05-20 15:40:28 -05:00
Shelley Vohr 9ca9311b73 docs: note required windows in 'new-window-for-tab' event (#49851)
docs: note required windows in new-window-for-tab
2026-02-18 19:30:43 -08:00
Ronald Eddy Jr 1c621cc982 docs: fix typos across documentation (#49734)
Fix 40 typos across 25 documentation files including misspellings,
missing words, doubled words, wrong words, and grammatical errors.
2026-02-11 12:45:46 +01:00
Shelley Vohr d7378d96a5 docs: add Wayland note to win.getPosition() and win.getBounds() (#49632)
docs: add Wayland note to win.getPosition()
2026-02-04 16:13:11 +01:00
Shelley Vohr 13e84e6868 fix: abort more descriptively for beforeunload (#48960) 2025-11-18 12:16:08 -05:00
Mitchell Cohen 2a94d414f7 docs: clarify BrowserWindow and App API support status on Wayland (#48740)
* docs: clarify BrowserWindow API support in Wayland

* typo fix

* updated docs

* wrapping
2025-10-31 16:35:08 -05:00
Shelley Vohr 0a19176917 feat: enable resetting accent color (#48274) 2025-10-21 10:49:08 -04:00
Niklas Wenzel 49335805d5 docs: mention setContentProtection macOS limitations (#48290) 2025-09-23 16:28:21 -05:00
Shelley VohrandWill Anderson 5c98e3609f feat: add {get|set}AccentColor on Windows (#47741)
* 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>
2025-08-01 22:29:02 +02:00
Milan BurdaandNiklas Wenzel 21b325b034 docs: improve win.setContentProtection() docs (#46596)
* docs: improve win.setContentProtection() docs

* docs: update Windows display affinity value

* docs: update Windows behavior description

* Revert "docs: update Windows behavior description"

This reverts commit 6d1942c53a.

* Revert "docs: update Windows display affinity value"

This reverts commit c15363e75d.

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-07-15 15:16:56 -07:00
Erick Zhao 6aa3665b96 docs: no class inheritance (#47403) 2025-06-10 10:00:06 +02:00
Shelley Vohr c84e8c6c22 feat: expose win.isContentProtected() (#47242)
* feat: expose win.isContentProtected()

* chore: remove stray _isContentProtected
2025-05-30 11:00:13 +02:00
David Sanders 0d70389ccb chore: lint code blocks in docs with ESLint (#42113) 2025-05-29 12:45:26 -07:00
Erick ZhaoandNiklas Wenzel 2493e530d0 docs: unify [!NOTE] structure (#46893)
* docs: unify [!NOTE] structure

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/browser-window.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/download-item.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/global-shortcut.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* revert line break

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-09 14:36:42 -07:00
Shelley Vohr ede84fc327 feat: support dip <-> screen conversion on Linux X11 (#46211)
feat: support dip <-> screen conversion on Linux
2025-05-02 10:31:45 +02:00
Charles Kerr 3f3c297c7a fix: enable some tests that were accidentally disabled (#46816)
* 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
2025-04-28 12:32:57 -05:00
Shelley Vohr 5da75c4a97 feat: support system-context-menu on Linux (#45848)
feat: support system-context-menu on Linux
2025-04-01 11:00:39 +02:00
Shelley Vohr 9ec14b91e7 feat: add BrowserWindow.isSnapped() (#46079)
* feat: add BrowserWindow.isSnapped() on Windows

* docs: mark _Readonly_
2025-03-24 12:09:14 +01:00
c5ea177b3d feat: add query-session-end and improve session-end events on Windows (#44598)
* 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>
2024-11-22 11:47:36 -08:00
Gellert Hegyi 7a79d4c96e feat: add optional animation parameter to BrowserWindow.setVibrancy (#35987)
adds optional animation parameter to BrowserWindow.setVibrancy
2024-11-12 09:03:30 -08:00
4d51edc504 docs: api history (#42982)
* feat(api-history): api history schema

Reference: https://github.com/electron/rfcs/blob/f36e0a8483e1ea844710890a8a7a1bd58ecbac05/text/0004-api-history-schema.md

* feat(api-history): add `lint:api-history` to `package.json`

* docs(api-history): add api history to `styleguide.md`

* docs(api-history): `win.flashFrame(flag)`

* docs(api-history): `new WebContentsView([options])`

* docs(api-history): non-navigation APIs on `WebContents`

* docs(api-history): `nativeImage.toDataURL`

* docs(api-history): `window.flashFrame(bool)`

* docs(api-history): `browser-view.md`

* docs(api-history): `ipcRenderer`

* docs(api-history): `protocol.*Protocol`

* revert: `new WebContentsView([options])`

This reverts commit 0a11efcf57.

* Apply suggestions from code review

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fix(api-history): remove incorrect `pr-url`

Reference: https://github.com/electron/electron/pull/42982/files#r1692532877

* docs(api-history): schema word choice

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

Reference: https://github.com/electron/website/commit/0b1b6a7cc0ed578a832f8ca254d1988c14f9bc13

* docs(api-history): nicer format example in `styleguide.md`

Reference: https://github.com/electron/electron/pull/42982#discussion_r1692539906

* docs(api-history): Always use double quotes for descriptions

* docs(api-history): `styleguide.md` improvements

* docs(api-history): copy `ipc-renderer.md` change to `context-bridge.md`

* docs(api-history): `styleguide.md` placement

* docs(api-history): add migration guide

* docs(api-history): remove confusing `breaking-changes-header` in `browser-view.md`

Reference: https://github.com/electron/electron/pull/42982/files/7b03c0703d7819add6afd022ec97a55b7a2aa268#r1703444772

* docs(api-history): move migration guide

Reference: https://github.com/electron/electron/pull/42982#discussion_r1703441001

* docs(api-history): update `breaking-changer-header`

Reference: https://github.com/electron/electron/pull/43217

* docs(api-history): deprecate `browser-view.md`

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-08-19 11:17:10 -07:00
Shelley Vohr 9fc760bc4c docs: note macOS fullscreen events in fullscreen query (#42997)
docs: note macOS fullscreen events in fs query
2024-07-23 16:40:59 -04:00
Shelley Vohr 32e5012017 feat: enable Windows Control Overlay on Linux (#41769) 2024-06-27 14:56:36 +02:00
Erick Zhao c3c4173377 docs: update formatting for mdx3 compatibility (#42052)
docs: update formatting for mdx3 compat
2024-05-07 19:20:47 -04:00
Erick Zhao b9c4b27781 docs: backslash escape parametrized TypeScript types (#41575)
* docs: backslash escape parametrized TypeScript types

* missing instances
2024-03-25 11:19:44 +01:00
Shelley Vohr 5f785f213e revert: add BrowserWindow.isOccluded()
This reverts commit 768ece6b54.
2024-02-12 09:35:34 +01:00
Milan BurdaandDavid Sanders 2ea569e0d2 docs: fix docs/api/base-window.md (#41240)
* docs: fix docs/api/base-window.md

* Update docs/api/base-window.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-02-08 10:13:48 +09:00
Shelley Vohr 768ece6b54 feat: add BrowserWindow.isOccluded() (#38982)
feat: add BrowserWindow.isOccluded()
2024-02-06 11:30:35 +01:00
Jeremy Rose 15c6014324 feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
David Sanders 3d2a754531 chore: extend linting of code blocks in the docs (#40245)
* chore: extend linting of code blocks in the docs

* chore: combine lint:markdownlint and lint:markdown scripts
2023-11-21 16:50:08 +09:00
Shelley Vohr 713d8c4167 feat: add tabbingIdentifier property to BrowserWindow (#39980)
feat: add tabbingIdentifier property to BrowserWindow
2023-10-03 12:27:40 -07:00
Milan BurdaandJohn Kleinschmidt c9eb3deab5 chore: remove deprecated scroll-touch-{begin,end,edge} events (#39814)
* chore: remove deprecated `scroll-touch-{begin,end,edge}` events

* update spec/ts-smoke

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-20 17:41:29 -04:00
Samuel Attard 470a14d8d4 docs: add missing macOS tag 2023-09-11 14:07:25 -07:00
Erick Zhao b8ac798344 docs: use node: imports for node core modules (#39681)
docs: use `node:` imports for node builtin modules
2023-08-30 11:55:23 -04:00
Milan Burda 90865fa97d chore: remove deprecated getTrafficLightPosition() / setTrafficLightPosition() (#39479)
chore: remove deprecated getTrafficLightPosition() / setTrafficLightPosition()
2023-08-21 15:58:09 +02:00
Shelley VohrandDavid Sanders 31dfde7fa6 docs: note macOS bounds Tray offset (#39512)
* docs: note macOS bounds Tray offset

* Update docs/api/browser-window.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2023-08-17 11:02:03 +02:00
Mikhail Leliakin f959fb0c96 feat: browserWindow.getBrowserViews() to return sorted by z-index array (#38943) 2023-07-11 11:01:30 +02:00
Mikhail Leliakin 56b5c00312 feat: add BrowserWindow.showAllTabs() for macOS (#38965) 2023-07-10 10:43:37 +02:00
ccd4531bfb chore: bump chromium to 117.0.5852.0 (main) (#38891)
* 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>
2023-07-01 16:22:55 -04:00