简体   繁体   中英

node-webkit: How can I detect how many screen/monitor user have using?

I'm developing a multiscreen app where I need to detect how many screen user have. Also I need to create that many window and move those window to every screen. So I basically need a way to know how many screen the user have and also a way to move my window to a specific screen.

Does nodewebkit already have solution for that? If not is there any alternative solution/hacks I might be able to use?

Found the solution as new Screen Geometry added at node-webkit v0.10.2. This will let you listen to Screen Bound, Display add, Display remove events.

Here is the documentation - https://github.com/rogerwang/node-webkit/wiki/Screen

This is added by a very recently new commit on nodewebkit to resolve this issue - https://github.com/rogerwang/node-webkit/pull/2178 .

Note - I did not test the code but looks like this is what I was looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM