YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
4.07k stars 122 forks source link

Support xdg-desktop-portal screenshot with multiple monitors #117

Open YaLTeR opened 10 months ago

YaLTeR commented 10 months ago

There are two issues:

  1. The code in niri doesn't handle multiple monitor scales yet. Since the portal wants a full all-monitors screenshot in one image, we should pick one scale (largest?) then scale everything to it (with nearest neighbor for integer scale).
  2. We don't crop workspaces horizontally because the crop element in Smithay doesn't work as expected, so windows overflow onto adjacent monitors.
YaLTeR commented 10 months ago

Converting from bug to enhancement; I made the portal return an error in the multi-monitor case instead of a broken screenshot.

YaLTeR commented 9 months ago

Lack of horizontal cropping also makes monitor screencast renders do more work than necessary.