Skip to content

fix: don't propagate GDK_BACKEND to subprocs#28898

Merged
codebytere merged 5 commits intomainfrom
gdk-backend-remove
Jun 8, 2021
Merged

fix: don't propagate GDK_BACKEND to subprocs#28898
codebytere merged 5 commits intomainfrom
gdk-backend-remove

Conversation

@codebytere
Copy link
Copy Markdown
Member

Description of Change

Closes #28436.

GDK_BACKEND is set by Chromium as of this CL and can detrimentally affect external app behaviors, so we want to unset it and replace with the user's setting if one exists.

Checklist

Release Notes

Notes: Fixed an issue where GDK_BACKEND was being propagated to subprocesses on Linux.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/12-x-y labels Apr 28, 2021
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Apr 28, 2021
@codebytere codebytere requested a review from ckerr April 28, 2021 15:07
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Apr 29, 2021
@codebytere codebytere force-pushed the gdk-backend-remove branch 7 times, most recently from bb623c5 to 4f53a61 Compare May 4, 2021 16:42
Copy link
Copy Markdown
Contributor

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add test to check if GDK_BACKEND has actually been cleared? It is possible that Chromium decides to move the code earlier and invalidates our workaround in future.

@codebytere codebytere force-pushed the gdk-backend-remove branch 4 times, most recently from f530859 to cac2e3b Compare May 5, 2021 08:17
@codebytere codebytere force-pushed the gdk-backend-remove branch from cac2e3b to 2f5a448 Compare May 6, 2021 07:44
Copy link
Copy Markdown
Contributor

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me, I think we just need a test to check if GDK_BACKEND has actually been cleared.

@codebytere codebytere force-pushed the gdk-backend-remove branch from 2f5a448 to fc649bb Compare May 19, 2021 14:53
options.environment["MM_NOTTTY"] = "1";

// If the user set a GDK_BACKEND value of their own, use that,
// otherwise unset it becuase Chromium is setting GDK_BACKEND
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo (nitpick): becuase => because

@codebytere codebytere requested a review from zcbenz May 19, 2021 19:32
@codebytere codebytere force-pushed the gdk-backend-remove branch from fc649bb to 3edf8ad Compare June 8, 2021 11:55
@codebytere codebytere merged commit 7b169c2 into main Jun 8, 2021
@codebytere codebytere deleted the gdk-backend-remove branch June 8, 2021 14:10
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Jun 8, 2021

Release Notes Persisted

Fixed an issue where GDK_BACKEND was being propagated to subprocesses on Linux.

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Jun 8, 2021

I was unable to backport this PR to "12-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed the target/12-x-y label Jun 8, 2021
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Jun 8, 2021

I was unable to backport this PR to "13-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Jun 8, 2021

I have automatically backported this PR to "14-x-y", please check out #29588

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

Labels

semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Electron propagates GDK_BACKEND=x11 to subprocesses, breaking shell.openExternal with Firefox on Wayland

5 participants