Skip to main content

Module outclient

Module outclient 

Source
Expand description

Output-management client scaling a nested app compositor’s screens. zwlr_output_management_v1 client: scales and arranges the screens of a nested session compositor, in-process rather than through a wlr-randr fork.

Applications draw larger when the compositor they are on scales its own output. Scaling pixelflux’s capture output instead shrinks the logical size the session is handed, which upscales the desktop rather than enlarging its interface, so a DPI change for a nested session lands here.

A session that opens one screen per capture output (a wlroots compositor under WLR_WL_OUTPUTS) arranges them by its own rule — side by side in the order they were opened — and that layout, not the capture one, is what places its windows and carries its pointer between screens. So the capture arrangement is mirrored into it (set_screen_layout), read back (list_screens), and the screens no capture output drives yet are held at a token size (hold_spare_screens) so the desktop does not lay out across a screen nobody sees. Screens are addressed by position in name order (WL-1, WL-2, …), the order the session opened them in.

Compositors without the protocol report [ScaleOutcome::Unsupported] and position nothing here; their scale comes from the capture output, which they follow, and a KWin session’s arrangement lands through kdeclient (kde_output_management_v2) instead. Blocking, off the compositor thread, with every round-trip deadline-bounded.

Enums§

ScaleOutcome
What a scale request did, from the caller’s point of view.

Functions§

hold_spare_screens
Hold every screen past the first keep at size. A session compositor opens the screens it was started with whether or not anything watches them, and one held at a real screen’s size stretches the session’s coordinate space onto a screen nobody sees. Returns how many were resized.
list_screens
The session’s enabled screens as (name, x, y, width, height), in screen order — what the compositor actually did with a layout and a mode, which is not always what it was asked for. A head carries no size itself, so the size is its current mode’s; (0, 0) where it announced none. Empty when the compositor manages no outputs for clients.
set_output_scale
Set the scale of the index-th screen of the compositor on socket_path, leaving its mode and position alone. Blocking; call off the compositor’s calloop thread.
set_screen_geometry
Give the index-th screen of the compositor on socket_path this mode and scale in one configuration.
set_screen_layout
Lay the session’s screens out at rects, one (x, y, width, height) per screen in screen order, so its own layout matches the arrangement the capture outputs were placed in.