Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes issue #662 (enables Pointer Lock Web API) #210875

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

whistlegraph
Copy link

@whistlegraph whistlegraph commented Apr 22, 2024

This change fixes microsoft/vscode-extension-samples#662
#221593

By explicitly allowing the pointerLock permission in the root document of the VS Code window.

Testing

  • You can test this change using the aesthetic-computer.aesthetic-computer-code extension in the Marketplace.
  • Open the Aesthetic Computer pane from the Activity Bar.
  • Enter fps and press [Enter].
  • Press [Escape] to end the Pointer Lock.

@dbaeumer dbaeumer assigned bpasero and unassigned dbaeumer Apr 23, 2024
@bpasero bpasero assigned mjbvz and unassigned bpasero Apr 23, 2024
@@ -166,7 +166,10 @@ export class CodeApplication extends Disposable {

const isUrlFromWebview = (requestingUrl: string | undefined) => requestingUrl?.startsWith(`${Schemas.vscodeWebview}://`);

const allowedPermissions = new Set(['pointerLock']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be enabled for the root document too? The only use case seems to be for webviews

Copy link
Author

Choose a reason for hiding this comment

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

Yes the permission did not work until I added it to the root. That is to say I also needed the permission on the containing frame in order for the child to function in my extension's Webview.

@mjbvz mjbvz added this to the July 2024 milestone Jul 12, 2024
@mjbvz mjbvz modified the milestones: July 2024, August 2024 Jul 24, 2024
@mjbvz mjbvz modified the milestones: August 2024, September 2024 Aug 28, 2024
@mjbvz mjbvz modified the milestones: September 2024, October 2024 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please add a minimal sample for creating an LSP client.
4 participants