Skip to content

Support getScreens on X11#149

Open
relh wants to merge 1 commit into
treeform:masterfrom
relh:feature/linux-getScreens
Open

Support getScreens on X11#149
relh wants to merge 1 commit into
treeform:masterfrom
relh:feature/linux-getScreens

Conversation

@relh

@relh relh commented Dec 5, 2025

Copy link
Copy Markdown

What changed

getScreens() now returns the default X11 screen as the primary screen. The earlier Wayland changes were removed as requested.

Check

  • nim c examples/screens.nim

@relh relh changed the title Add Linux getScreens X11 fallback Add Linux getScreens X11/wayland fallback Dec 5, 2025

@treeform treeform left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just X11

Comment thread examples/screens.nim Outdated
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):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is emscripten?

Comment thread src/windy/platforms/linux/platform.nim Outdated
include x11
# include x11_2
when defined(wayland):
include wayland

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz

Comment thread src/windy/platforms/linux/x11.nim Outdated
## Minimal screen enumeration for X11. Returns the default screen as primary.
init()

let s = display.screen(display.defaultScreen)

Copy link
Copy Markdown
Owner

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

@relh relh changed the title Add Linux getScreens X11/wayland fallback Add Linux screen detection to Windy Jun 9, 2026
Return the default X11 screen as the primary screen so Linux callers can use the same API as the other platforms.
@relh
relh force-pushed the feature/linux-getScreens branch from dd667e9 to 5db2a77 Compare July 22, 2026 21:36
@relh relh changed the title Add Linux screen detection to Windy Support getScreens on X11 Jul 22, 2026
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

Successfully merging this pull request may close these issues.

2 participants