wayland: fix frame decoration when in tiled/ssd mode [chromium/src : main]

18 views
Skip to first unread message

Nick Yamane (Gerrit)

unread,
Sep 30, 2022, 2:54:55 PM9/30/22
to ozone-...@chromium.org, Chromium LUCI CQ, Alexander Dunaev, chromium...@chromium.org, Max Ihlenfeldt

Attention is currently required from: Alexander Dunaev.

Patch set 6:Commit-Queue +1

View Change

1 comment:

To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I164fead8df936a075db40ea251fd2384d997d19e
Gerrit-Change-Number: 3924221
Gerrit-PatchSet: 6
Gerrit-Owner: Nick Yamane <nick...@igalia.com>
Gerrit-Reviewer: Alexander Dunaev <adu...@igalia.com>
Gerrit-Reviewer: Nick Yamane <nick...@igalia.com>
Gerrit-CC: Max Ihlenfeldt <m...@igalia.com>
Gerrit-Attention: Alexander Dunaev <adu...@igalia.com>
Gerrit-Comment-Date: Fri, 30 Sep 2022 18:53:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Nick Yamane <nick...@igalia.com>
Comment-In-Reply-To: Alexander Dunaev <adu...@igalia.com>
Gerrit-MessageType: comment

Alexander Dunaev (Gerrit)

unread,
Oct 3, 2022, 10:37:12 AM10/3/22
to Nick Yamane, ozone-...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, Max Ihlenfeldt

Attention is currently required from: Nick Yamane.

Patch set 6:Code-Review +1

View Change

3 comments:

  • Patchset:

  • 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:

    • 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.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I164fead8df936a075db40ea251fd2384d997d19e
Gerrit-Change-Number: 3924221
Gerrit-PatchSet: 6
Gerrit-Owner: Nick Yamane <nick...@igalia.com>
Gerrit-Reviewer: Alexander Dunaev <adu...@igalia.com>
Gerrit-Reviewer: Nick Yamane <nick...@igalia.com>
Gerrit-CC: Max Ihlenfeldt <m...@igalia.com>
Gerrit-Attention: Nick Yamane <nick...@igalia.com>
Gerrit-Comment-Date: Mon, 03 Oct 2022 14:35:51 +0000

Nick Yamane (Gerrit)

unread,
Oct 3, 2022, 11:15:28 AM10/3/22
to ozone-...@chromium.org, Alexander Dunaev, Chromium LUCI CQ, chromium...@chromium.org, Max Ihlenfeldt

Patch set 6:Commit-Queue +2

View Change

2 comments:

  • Patchset:

  • File ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h:

To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I164fead8df936a075db40ea251fd2384d997d19e
Gerrit-Change-Number: 3924221
Gerrit-PatchSet: 6
Gerrit-Owner: Nick Yamane <nick...@igalia.com>
Gerrit-Reviewer: Alexander Dunaev <adu...@igalia.com>
Gerrit-Reviewer: Nick Yamane <nick...@igalia.com>
Gerrit-CC: Max Ihlenfeldt <m...@igalia.com>
Gerrit-Comment-Date: Mon, 03 Oct 2022 15:13:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Chromium LUCI CQ (Gerrit)

unread,
Oct 3, 2022, 12:50:46 PM10/3/22
to Nick Yamane, ozone-...@chromium.org, Alexander Dunaev, chromium...@chromium.org, Max Ihlenfeldt

Chromium LUCI CQ submitted this change.

View Change


Approvals: Alexander Dunaev: Looks good to me Nick Yamane: Commit
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(-)


To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I164fead8df936a075db40ea251fd2384d997d19e
Gerrit-Change-Number: 3924221
Gerrit-PatchSet: 7
Gerrit-Owner: Nick Yamane <nick...@igalia.com>
Gerrit-Reviewer: Alexander Dunaev <adu...@igalia.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Nick Yamane <nick...@igalia.com>
Gerrit-CC: Max Ihlenfeldt <m...@igalia.com>
Gerrit-MessageType: merged

Nick Yamane (Gerrit)

unread,
Oct 26, 2022, 7:51:42 PM10/26/22
to Chromium LUCI CQ, ozone-...@chromium.org, Alexander Dunaev, chromium...@chromium.org, Max Ihlenfeldt

Nick Yamane has created a revert of this change.

View Change

To view, visit change 3924221. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I164fead8df936a075db40ea251fd2384d997d19e
Gerrit-Change-Number: 3924221
Gerrit-PatchSet: 7
Gerrit-Owner: Nick Yamane <nick...@igalia.com>
Gerrit-Reviewer: Alexander Dunaev <adu...@igalia.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Nick Yamane <nick...@igalia.com>
Gerrit-CC: Max Ihlenfeldt <m...@igalia.com>
Gerrit-MessageType: revert
Reply all
Reply to author
Forward
0 new messages