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

how to set postion of the window? #15

Closed
anhnhoktvn opened this issue Aug 13, 2023 · 3 comments
Closed

how to set postion of the window? #15

anhnhoktvn opened this issue Aug 13, 2023 · 3 comments

Comments

@anhnhoktvn
Copy link

Is there a way to change the position of the window. For example, I'd like to make it in the center of the screen. Thank you!

@Winterreisender
Copy link
Owner

Thanks for your feedback. But unfortunately our upstream project, webview, does not support this feature, so we can't do that. This repo is only a Node.js binding for webview. If you need new features, you could send you feedback to webview. I would be happy to try making API bindings after webview adding them.

@Winterreisender
Copy link
Owner

Winterreisender commented Aug 14, 2023

You may see this feature request in webview: webview/webview#642, in which it mentioned a method to center the window using C++. webview-nodejs support setting the target window handle. So if you can create a centered window, and pass the handle to webview-nodejs by using target parameter in new Webview(debug?: boolean, libPath?: string, target?: null), it may work.

@anhnhoktvn
Copy link
Author

Thank you, It's seem nothing I can do with this. I may try workaround with xdotool

@Winterreisender Winterreisender closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2023
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