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

WebView2 - Option to remove titlebar from export #465

Open
2 tasks done
FireskiesStudios opened this issue Feb 10, 2025 · 1 comment
Open
2 tasks done

WebView2 - Option to remove titlebar from export #465

FireskiesStudios opened this issue Feb 10, 2025 · 1 comment

Comments

@FireskiesStudios
Copy link

Reviewed guidelines

  • I have read and understand the suggestion guidelines

Checked for duplicate suggestions

  • I checked for existing similar suggestions

Summary

WebView2 seems to lack the ability to remove the native titlebar and window controls from exported projects. I always make my own to keep them in style with the rest of the project, but can no longer do so when using WebView2, therefore I'm still limited to NW.js exports only.

Possible workarounds or alternatives

I've read about possibly making some kind of app or plugin using C++ to manually remove the titlebar, but I'm afraid the C++ is WAY above my head...

Proposed solution

I don't know enough about it to offer a suggestion myself... but when describing the problem to chatGPT, it suggested:

"Add an option in the WebView2 export settings for "Frameless Window Mode."
When enabled, this would:

  1. Export the application as a borderless, frameless window, without the default system titlebar and controls.
  2. Give developers full control over window management via JavaScript, allowing them to create their own custom titlebars, buttons, and drag functionality.

Suggested Implementation:

  • Use WebView2's CoreWebView2Controller to disable the default frame during initialization:

{
let environment = await CoreWebView2Environment.CreateAsync(null, null, null);
let controller = await CoreWebView2Controller.CreateAsync(environment);
controller.ShouldShowDefaultTitleBar = false; // Disable titlebar
}

  • Add a "Frameless Mode" checkbox to the WebView2 export options in Construct 3:
    When checked, the exported app will launch as a frameless window."

Does this count as suggesting a solution?

Why is this idea important?

There is a lot of room for Construct 3 to be used in app development and not just games. As such, that means that being able to visually style the entire presentation in a cohesive way is incredibly important, ESPECIALLY for projects targeting Desktop exports first and foremost.

Additional remarks

I've been using Construct since the Construct Classic days, and have grown as a user alongside it. It's been an amazing journey to witness and participate in. Thank you for all your hard work over the years

@j0schi
Copy link

j0schi commented Feb 19, 2025

I fully support this request, as WebView2 currently lacks key features that NW.js supported, such as:

  • True frameless windows (no titlebar or system controls).
  • Full transparency support (remove forced white background).
  • Custom window interactions (custom drag and resize zones).

These features were fully functional in NW.js, allowing developers to create overlay apps, custom UI designs, and frameless, always-on-top applications. With NW.js no longer being maintained, this is a critical feature loss that WebView2 should restore.

NW.js provided these features for years, and losing them limits Construct 3's potential for desktop applications. Adding support for frameless, transparent WebView2 exports would be a huge step forward.

I havent tested it for the other new Lin and OSX export options but it would also be nice if it would work there.

I hope this request gets considered. Thanks for all the hard work on Construct 3!

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

No branches or pull requests

2 participants