Attention is currently required from: Alexander Dunaev.
Patch set 6:Commit-Queue +1
1 comment:
File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc:
Patch Set #3, Line 310: !GetDecorationInsetsInDIP().IsEmpty();
I trust your consideration, but if we change the logic this way, I would also suggest renaming the m […]
I've reworked the solution and I now I believe it's less controversial, as its base is when ssd is enforced by the compositor, which in practice means that Chrome *should not* draw drop shadows, ie: no frame insets.
PTAL again. My proposal is to merge this as a short-term solution and I volunteer to improve Chrome code to better handle this Wayland-specific cases (as a Sway user who's been trying to use Chrome Ozone/Wayland as my primary browser), which includes:
[1] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.cc;l=68-86;drc=0d0cbbeedf5831fe32e4823c0e5a854983c64ed8
[2] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc;l=48-54;drc=a432cd59d51281057ba2a2673ca645a9600bb927
[3] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.cc;l=93-95;drc=0d0cbbeedf5831fe32e4823c0e5a854983c64ed8
To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Nick Yamane.
Patch set 6:Code-Review +1
3 comments:
Patchset:
LGTM with one really minor thing.
File ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h:
Patch Set #6, Line 166: DecorationMode decoration_mode_ = DecorationMode::kNone;
Nit: should we prefer assignment or initialiser list here? I. e., should it be:
DecorationMode decoration_mode_{DecorationMode::kNone};
File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc:
Patch Set #3, Line 310: !GetDecorationInsetsInDIP().IsEmpty();
I've reworked the solution and I now I believe it's less controversial, as its base is when ssd is e […]
Ack
To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 6:Commit-Queue +2
2 comments:
Patchset:
Thanks for the review.
File ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h:
Patch Set #6, Line 166: DecorationMode decoration_mode_ = DecorationMode::kNone;
Nit: should we prefer assignment or initialiser list here? I. e., should it be: […]
Per our offline discussion, this assignment syntax should be ok here for this "simple initialization with one or more literal values" [1].
To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.
Chromium LUCI CQ submitted this change.
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=adu...@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 <adu...@igalia.com>
Commit-Queue: Nick Yamane <nick...@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1054200}
---
M ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h
M ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
M ui/ozone/platform/wayland/host/wayland_window_unittest.cc
M ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc
M ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
5 files changed, 81 insertions(+), 9 deletions(-)
Nick Yamane has created a revert of this change.
To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.