Skip to content

fix: register PrintDialogLinuxFactory on Linux - #50486

Merged
jkleinsc merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-register-printdialoglinuxfactory-on-linux-1774460233776
Mar 26, 2026
Merged

jkleinsc merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-register-printdialoglinuxfactory-on-linux-1774460233776

Conversation

@trop

@trop trop Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Backport of #50430

See that PR for details.

Notes: Fixed printing on Linux failing with "Invalid printer settings".

Chromium 145 refactored Linux print dialog creation to use a factory
pattern instead of directly calling LinuxUi::CreatePrintDialog().
Chrome registers this factory in
ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized(), but
Electron did not, causing PrintingContextLinux::EnsurePrintDialog()
to leave print_dialog_ null on every call.

Without a dialog, UseDefaultSettings() and UpdatePrinterSettings()
return success but with empty/unprocessed settings, causing
PrintMsgPrintParamsIsValid() to fail. This broke both window.print()
(no dialog appears) and webContents.print() (callback stuck until
app close with "Invalid printer settings").

Co-authored-by: Shelley Vohr <[email protected]>
@trop
trop Bot requested review from a team and codebytere March 25, 2026 17:37
@trop trop Bot mentioned this pull request Mar 25, 2026
4 tasks done
@trop trop Bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 25, 2026
@jkleinsc
jkleinsc merged commit 33a81b4 into 41-x-y Mar 26, 2026
109 of 112 checks passed
@jkleinsc
jkleinsc deleted the trop/41-x-y-bp-fix-register-printdialoglinuxfactory-on-linux-1774460233776 branch March 26, 2026 21:01
@release-clerk

release-clerk Bot commented Mar 26, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed printing on Linux failing with "Invalid printer settings".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant