mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
fix: register PrintDialogLinuxFactory on Linux 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: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>