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

Multiple window support - feature request #1121

Open
gitgit3 opened this issue Jul 9, 2024 · 5 comments
Open

Multiple window support - feature request #1121

gitgit3 opened this issue Jul 9, 2024 · 5 comments
Labels
type: feature request Issue is a feature request

Comments

@gitgit3
Copy link

gitgit3 commented Jul 9, 2024

Greetings webview crew. I am a newby. Maybe this is something that can be done but in a different way, please let me know.

Because the 'run' method blocks, it's not possible to use the main thread for anything. Is there a possibility of allowing access to the main message loop. I have implemented a simple version by calling the gtk_main_iteration_do() method by adding a 'step' call to the webview api. This allows me to run my own message loop calling 'step' for each window in my app.

How is this API designed to be used, since the 'run' method blocks, you would need to create additional threads. I am not familiar with the GTK model, so I maybe way out here.

Any thoughts welcome.

@gitgit3
Copy link
Author

gitgit3 commented Jul 16, 2024

I have implemented this for GTK if anyone is interested. But I don't have the OS's to write and test the MS and Mac versions.

@neroist
Copy link

neroist commented Jul 17, 2024

How does your GTK implementation look like?

@gitgit3
Copy link
Author

gitgit3 commented Jul 17, 2024

I was just going to attach my version of webview.h but it's not allowed!

I could git pull and branch, but how do I upload?

@neroist
Copy link

neroist commented Jul 18, 2024

Could you put your changes on a fork then git push?

@gitgit3
Copy link
Author

gitgit3 commented Jul 18, 2024

Creating a "personal access token", what a royal pain in the butt...

Here's my fork
https://github.com/gitgit3/webview-jkp

It's not weapons grade code to be honest. I've not fixed the run() method to close without a gtk error, but I'm not using run() in my project.

There's also some hardcoded title-bar styling for child windows which can be ignored, although it would be nice to do that properly if multiple windows are supported.

@SteffenL SteffenL added the type: feature request Issue is a feature request label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Issue is a feature request
Development

No branches or pull requests

3 participants