wlroots/backend/wayland
Anatolii Smolianinov 514eeebd3c backend/wayland: Fix HiDPI support for nested compositors
When running a wlroots-based compositor nested under another Wayland
compositor with HiDPI scaling, the nested window appears blurry and
incorrectly sized. This is because the Wayland backend does not:

1. Detect and track the parent compositor's output scale
2. Set wl_surface_set_buffer_scale() to match the parent's scale
3. Multiply output dimensions by the scale factor when handling
   configure events

This patch fixes all three issues by:

- Adding wlr_wl_parent_output structure to track parent outputs
- Listening to wl_output.scale events from the parent compositor
- Setting buffer_scale on all backend surfaces (output and layers)
- Scaling output dimensions to account for buffer scale
- Setting wlr_output.scale so nested clients render at correct DPI

Implements: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/854
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5186
Co-Authored-By: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
2026-06-07 21:57:02 +02:00
..
backend.c backend/wayland: Fix HiDPI support for nested compositors 2026-06-07 21:57:02 +02:00
meson.build meson: use kwargs for wayland deps 2024-11-21 16:46:55 +00:00
output.c backend/wayland: Fix HiDPI support for nested compositors 2026-06-07 21:57:02 +02:00
pointer.c backend/wayland: Fix HiDPI support for nested compositors 2026-06-07 21:57:02 +02:00
seat.c backend/wayland: Fix HiDPI support for nested compositors 2026-06-07 21:57:02 +02:00
tablet_v2.c backend/wayland: Fix HiDPI support for nested compositors 2026-06-07 21:57:02 +02:00