Skip to content

fix: register PrintDialogLinuxFactory on Linux - #50485

Closed
trop[bot] wants to merge 1 commit into
40-x-yfrom
trop/40-x-y-bp-fix-register-printdialoglinuxfactory-on-linux-1774460233052
Closed

trop[bot] wants to merge 1 commit into
40-x-yfrom
trop/40-x-y-bp-fix-register-printdialoglinuxfactory-on-linux-1774460233052

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 40-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 25, 2026
@jkleinsc

Copy link
Copy Markdown
Member

Closing as Electron 40 uses Chromium 144 and this fix is for Chromium >= 145. cc @codebytere.

@jkleinsc jkleinsc closed this Mar 26, 2026
@trop
trop Bot deleted the trop/40-x-y-bp-fix-register-printdialoglinuxfactory-on-linux-1774460233052 branch March 26, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

40-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