Is your feature request related to a problem? Please describe.
Currently, runtime.ScreenGetAll() provides information about screen size but lacks screen position data, which is crucial for proper window positioning in multi-monitor setups. This makes it difficult to reliably position windows on specific monitors.
Describe the solution you'd like
Add position fields to the Screen struct.
The information to populate those is already available internally on supported platforms in `internal/frontend/desktop/*/screen.go:
- Windows: all info is readily available: inside
EnumProc(), see lprcMonitor
- macOS: inside
GetNthScreen: you can get values from NSScreen frame
- Linux: inside
GetNThMonitor: use x and y fields in GdkRectangle geometry
Describe alternatives you've considered
No response
Additional context
Use Case:
When restoring window position in multi-monitor setups, we need to:
- Know where each screen is located in the virtual desktop space
- Validate if saved window coordinates are within valid screen bounds
- Ensure windows are restored to the correct monitor
- Handle cases where the previous monitor setup is no longer available
Is your feature request related to a problem? Please describe.
Currently,
runtime.ScreenGetAll()provides information about screen size but lacks screen position data, which is crucial for proper window positioning in multi-monitor setups. This makes it difficult to reliably position windows on specific monitors.Describe the solution you'd like
Add position fields to the Screen struct.
The information to populate those is already available internally on supported platforms in `internal/frontend/desktop/*/screen.go:
EnumProc(), seelprcMonitorGetNthScreen: you can get values fromNSScreen frameGetNThMonitor: usexandyfields inGdkRectangle geometryDescribe alternatives you've considered
No response
Additional context
Use Case:
When restoring window position in multi-monitor setups, we need to: