-
Notifications
You must be signed in to change notification settings - Fork 19
Add Linux getScreens X11/wayland fallback #149
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
base: master
Are you sure you want to change the base?
Conversation
treeform
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just X11
| when defined(windows) or defined(macosx): | ||
| # Screens API only currently supported on Windows and macOS | ||
|
|
||
| when defined(windows) or defined(macosx) or defined(linux) or defined(emscripten): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is emscripten?
| include x11 | ||
| # include x11_2 | ||
| when defined(wayland): | ||
| include wayland |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz
| ## Minimal screen enumeration for X11. Returns the default screen as primary. | ||
| init() | ||
|
|
||
| let s = display.screen(display.defaultScreen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should return all of the screen
Add getScreens on Linux. For X11, return the default screen as the primary monitor. For Wayland, bind wl_output, capture geometry/mode/scale, normalize mode by scale into logical coordinates, prefer current → preferred → first mode, and fall back to a single 1920×1080 primary when no outputs are advertised. Platform dispatch now includes Wayland when compiled with -d:wayland, otherwise X11.