Skip to content
Commit 1144ea71 authored by Nick Diego Yamane's avatar Nick Diego Yamane Committed by Chromium LUCI CQ
Browse files

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: default avatarAlexander Dunaev <adunaev@igalia.com>
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1054200}
parent b5db3032
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment