cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.32k stars 71 forks source link

be able to specify the monitor which window will be created/displayed [multiple monitors support] #997

Open c1ngular opened 5 days ago

c1ngular commented 5 days ago

Describe the feature

it is quite usual for Desktop application to display different window/content among different monitors when present , especially applications developed for professional use , i.e. specify the monitor which will be shown when create a desktop window , if i remembered right , glfw support such a feature , and from code MonitorChange and GetScreens , i think it is quite close to such a feature ?

thanks

Relevant code

No response

kkoreilly commented 5 days ago

Yep, there are several issues with our multiple monitor support that we will fix soon. Would it be sufficient to save the current monitor of a window so that the same window will open in the same monitor in the future for the same user? That way the user will have control over what monitor windows are created on, and the developer will not have to manually specify anything.

c1ngular commented 4 days ago

@kkoreilly i think it's better to make this optional parameter when creating a window as GLFW does.

i found an very good example of this from MS office(wps office too), by default when playing PowerPoint slides, if it detected an extended monitor, it beautifully presents fullscreened slides without any additional visual components (immerse mode i would call this ) in secondary monitor (window B), and shows an control and preview user interface (window A) in primary monitor, this is very good user experience. even better, it has an option to change/disable this default behavior to end user .

i think OBS has similar feature too , display program video in secondary monitor.

there are many similar scenarios : primary monitor : control and preview secondary monitor: final presentation/output

it would be the best if both developer(by API) and end user (by drag window) could both control this behavior. if not both, let developer decide and evolve.

kkoreilly commented 4 days ago

Thanks for providing those possible use cases; I will work on adding support for both user and developer control of monitor placement soon.

c1ngular commented 3 days ago

@kkoreilly thank you for your wonderful work.