Skip to content

Comments

fix: make pointer lock work on Wayland#49283

Merged
jkleinsc merged 1 commit intoelectron:40-x-yfrom
vainiovano:wayland-pointer-lock
Feb 17, 2026
Merged

fix: make pointer lock work on Wayland#49283
jkleinsc merged 1 commit intoelectron:40-x-yfrom
vainiovano:wayland-pointer-lock

Conversation

@vainiovano
Copy link

@vainiovano vainiovano commented Dec 30, 2025

Description of Change

Chromium used to only implement pointer lock on Wayland in
Chrome-specific code, and this prevented Electron from making use of it.
This has been fixed on chromium main, so backport this as a patch to
Electron.

Checklist

Release Notes

Notes: Made pointer lock work on Wayland.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Dec 30, 2025
@vainiovano
Copy link
Author

@nikwen
Copy link
Member

nikwen commented Dec 30, 2025

Thanks for the PR!

Chromium only implements pointer lock for Wayland in BrowserDesktopWindowTreeHostLinux and not DesktopWindowTreeHostLinux

Would it make sense to fix this upstream by implementing it in DesktopWindowTreeHostLinux, too?

@vainiovano
Copy link
Author

Would it make sense to fix this upstream by implementing it in DesktopWindowTreeHostLinux, too?

Yeah, I don't see anything that would prevent implementing it there, and this was in fact suggested in the initial PR that implemented pointer lock on Wayland. I opened https://chromium-review.googlesource.com/c/chromium/src/+/7362747 for this.

@redactedontop
Copy link

Thank you SO MUCH!

nikwen
nikwen previously requested changes Jan 5, 2026
Copy link
Member

@nikwen nikwen left a comment

Choose a reason for hiding this comment

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

Thank you so much, @vainiovano! 🙏

I just got a notification that your patch was merged upstream.

Could you update this PR to be a backport of that patch? Here are our docs for how the patch system works.

In short:

  1. Go into src
  2. Apply your patch
  3. git commit
  4. e patches chromium
  5. cd electron
  6. git commit
  7. git push -f

@vainiovano vainiovano force-pushed the wayland-pointer-lock branch from 5b3b036 to 1ecd2ce Compare January 6, 2026 08:38
@vainiovano vainiovano requested a review from a team as a code owner January 6, 2026 08:38
@vainiovano
Copy link
Author

@nikwen This has now been turned into a backport of the upstream patch

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jan 6, 2026
@vainiovano vainiovano force-pushed the wayland-pointer-lock branch from 1ecd2ce to b5f6e3c Compare January 6, 2026 18:31
@ckerr ckerr added semver/patch backwards-compatible bug fixes target/40-x-y PR should also be added to the "40-x-y" branch. labels Jan 7, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello @vainiovano! It looks like this pull request touches one of our dependency or CI files, and per our contribution policy we do not accept these types of changes in PRs.

@vainiovano
Copy link
Author

I updated this to target the 40-x-y branch since my upstream patch has been included on main for a while.

@vainiovano vainiovano requested a review from ckerr January 13, 2026 15:07
@vainiovano vainiovano force-pushed the wayland-pointer-lock branch from 427bae4 to 203272d Compare January 14, 2026 19:01
@github-actions github-actions bot added the target/41-x-y PR should also be added to the "41-x-y" branch. label Jan 19, 2026
@codebytere codebytere added the backport-check-skip Skip trop's backport validity checking label Jan 20, 2026
@codebytere
Copy link
Member

@vainiovano it looks like the patch fails to apply?

@vainiovano
Copy link
Author

@codebytere It looks like the chromium update in ee64692 is conflicting with 45a6bfb: the patch got backported upstream, and the electron backport is now conflicting with it.

@vainiovano
Copy link
Author

Rebased to bring in 21c6e4e which drops the v8 patch

Chromium used to only implement pointer lock on Wayland in
Chrome-specific code, and this prevented Electron from making use of it.
This has been fixed on chromium main, so backport this as a patch to
Electron.
@jkleinsc jkleinsc dismissed stale reviews from github-actions[bot] and nikwen February 17, 2026 20:35

stale

@jkleinsc jkleinsc merged commit 3302c4d into electron:40-x-y Feb 17, 2026
102 of 104 checks passed
@welcome
Copy link

welcome bot commented Feb 17, 2026

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Feb 17, 2026

Release Notes Persisted

Made pointer lock work on Wayland.

@trop
Copy link
Contributor

trop bot commented Feb 17, 2026

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

@trop trop bot added needs-manual-bp/40-x-y and removed target/40-x-y PR should also be added to the "40-x-y" branch. labels Feb 17, 2026
@trop
Copy link
Contributor

trop bot commented Feb 17, 2026

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

@trop trop bot added in-flight/41-x-y and removed needs-manual-bp/40-x-y target/41-x-y PR should also be added to the "41-x-y" branch. in-flight/41-x-y labels Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants