Skip to content

Revert "screenshot: Scale and unscale the area for HiDpi displays"

Jonas Dreßler requested to merge verdre/gnome-shell:better-select-area-api into main

Commit b04c7964 was meant to fix screenshots on hidpi displays by scaling up the coordinates passed to ScreenshotArea to physical coordinates. That's because apparently something back in the day was "unscaling" the coords it passed to ScreenshotArea.

From todays perspective, that commit was a pretty bad idea: With legacy scale-factor scaling almost everything operates in physical coordinates, including gnome-shells and mutters screencasting APIs. That makes it really weird that two APIs, SelectArea and ScreenshotArea, use "unscaled" coordinates instead.

Revert that old commit and switch to physical coordinates for those APIs, too. This will affect almost no API users, since usually the rectangle from SelectArea gets passed directly to ScreenshotArea (gnome-screenshot does that for example). For all API users which exclusively use either ScreenshotArea or SelectArea, this should make things easier because it's consistent with all other APIs (including monitor sizes).

This reverts commit b04c7964.

Merge request reports