makepad/examples/screen_span/tests/ui.rs
ben cerveny 1795e62ce6
Linux direct: one desktop across screens and GPUs, per-screen window management, saved display layout, fullscreen across chosen screens (#1287)
* platform (linux direct): one wide desktop across the rendering GPU's outputs -- outputs are arranged left to right (MAKEPAD_DISPLAY_ORDER, per-connector MAKEPAD_DRM_MODES), the app sees one window spanning them and each output scans out its own slice of a single composition; screens() lists the outputs in window coordinates on the direct backend, republished when the layout changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* platform (linux direct): screens on other GPUs join the wide desktop -- each other card gets a peer direct renderer fed through a cross-GPU DMA-BUF bridge (GpuBridge::send_region), with resend on missed frames, per-card creation backoff and rate-limited errors; peers adopt the layout with the composition

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* platform (linux direct): main screen on any GPU, render-on, runtime display modes and order -- frame pacing is separate from the main screen (a timer paces when the rendering card has no output, so peers keep running), MAKEPAD_VULKAN_COMPOSITOR_PCI/_UUID chooses the rendering card without excluding others, Cx::linux_set_display_mode/_order/_source apply at runtime (also to peers before they start), LinuxDisplayOutput reports card, pci, modes and mode override, linux_screen_names()/linux_display_generation() expose screen identity and changes, and the pointer is clamped to the union of screen rects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* wm: one layout per screen on a multi-screen Linux direct desktop -- ScreenSet keeps a WmLayout per screen keyed by connector (workspaces per screen), the active screen follows the pointer, new windows/menus/panels/OSD/notifications open on it, SUPER+SHIFT+ALT+Left/Right moves the focused window to the previous/next screen, a bar segment per screen, the dock on the main screen listing every window; screens added/removed are reconciled with a 2 s removal debounce and windows return to a screen that comes back

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* wm: saved display layout and the Display panel -- ~/.config/makepad/wm/display-layout (keyed by card PCI address and connector) stores order, main screen, per-screen modes and the render-on GPU; the WM restores it at runtime and tools/linux/display-layout-env.sh turns it into env for the first frame at session start; the panel arranges screens (move, make main, mode), chooses Render on and offers Restart desktop now (exit 75 for the service to restart); per-screen event-flow fixes for the debounce window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* wm_api, wm: fullscreen across chosen screens -- ScreenSpan (Screens/All/Current) with span_rect, WmRequest::SetFullscreenSpan and WmEvent::Screens (window-local screen rects); makepad_wm_api::screens()/set_fullscreen_span() work hosted and standalone on the direct backend; the WM draws a span's window across its screens per workspace, hides those screens' bar segments (the bar floats over the scene with two or more screens) and SUPER+F with several screens fills one screen; the dock stands aside while the main screen is fullscreen; examples/screen_span demonstrates it; an external display env wins over the saved layout at runtime too; env vars and the saved-layout contract are documented where they are read

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 13:03:07 +02:00

11 lines
474 B
Rust

use makepad_test::{makepad_test, Selector, TestApp};
// A dev machine running this standalone (not under the Linux direct
// backend, and not hosted by the WM) reports no screens at all --
// `wm_api::screens()` is empty there -- so the status line's steady state
// is the "no screens reported" message.
#[makepad_test]
fn screen_span_reports_no_screens_standalone(app: TestApp) {
app.locator(Selector::id("status_label"))
.wait_text("no screens reported");
}