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

Disable WebView2 mini menu ("OOUI") (fix #535) #559

Merged
merged 3 commits into from Apr 29, 2022

Conversation

JensMertelmeyer
Copy link
Contributor

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Other information

This disables the "mini menu" referenced in #535 by using the AdditionalBrowserArguments when creating the WebView2 environment.

Previously, CreateCoreWebView2EnvironmentWithOptions(..) was only called when data_directory in WebContext was set, otherwise just CreateCoreWebView2Environment(..). I have changed it a bit to always call it "with options", and passing PWSTR::default() as a data directory if none was given.

Existing behaviour has not been changed, just the "mini menu" has been disabled.

@JensMertelmeyer JensMertelmeyer requested a review from a team April 25, 2022 20:05
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

Thanks for taking time to implement this.

src/webview/webview2/mod.rs Outdated Show resolved Hide resolved
src/webview/webview2/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
amrbashir
amrbashir previously approved these changes Apr 26, 2022
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

LGTM! and It works fine.

@wusyong
Copy link
Member

wusyong commented Apr 28, 2022

Could you run cargo fmt? I'll merge once it's passed formatting CI

@JensMertelmeyer JensMertelmeyer requested a review from a team as a code owner April 29, 2022 10:08
@amrbashir amrbashir merged commit ed0b223 into tauri-apps:dev Apr 29, 2022
@github-actions github-actions bot mentioned this pull request Apr 29, 2022
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.

None yet

3 participants