wayland: fix frame decoration when in tiled/ssd mode
SwayWM implements a tiling window manager and, by default uses server-side decorations to draw, for example, simple pixel borders around the toplevel windows. In such case, Chrome shouldn't include decoration insets (with drop shadows, etc) when 'use system title bar' setting setting is off, which would mean client-side decoration mode. That's because Sway enfores ssd, even if clients request to use csd, and that's spec-compliant [1], as per: > The compositor can decide not to use the client's mode and enforce a > different mode instead. When xdg-shell reports tiled modes ozone/wayland already reports it up to its delegate, which in case of Chrome already sets the decoration inset to (0,0,0,0), though the was still a missing bit in order to get it correctly rendered, that's what this CL adds as well as unit tests to exercise such code path. R=adunaev@igalia.com [1] https://wayland.app/protocols/xdg-decoration-unstable-v1#zxdg_toplevel_decoration_v1:request:set_mode Bug: 1369621, 1294191 Test: ozone_unittests and manually with Chrome under SwayWM Change-Id: I164fead8df936a075db40ea251fd2384d997d19e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3924221 Reviewed-by:Alexander Dunaev <adunaev@igalia.com> Commit-Queue: Nick Yamane <nickdiego@igalia.com> Cr-Commit-Position: refs/heads/main@{#1054200}
Loading
Please register or sign in to comment