Ozone/Wayland implement async window state changes [chromium/src : main]

0 views
Skip to first unread message

Hidehiko Abe (Gerrit)

unread,
May 8, 2026, 5:25:05 AMMay 8
to Patryk Chodur, Mitsuru Oshima, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Patryk Chodur

Hidehiko Abe added 6 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Hidehiko Abe . resolved

My initial scan.

First of all, thank you for taking a look into the work!
Then, ... TBH, ...I'm wondering if we're moving towards to the same direction. Now, I replied some design questions below, and skipped detailed code reviews, because the strategy/implementation may need to be largely changed.
Could you take a look into my questions below? Also, if needed, please feel free to reach out to me over IM etc. or maybe VC for better iteration.

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Line 210, Patchset 4 (Parent): if (fullscreen) {
Hidehiko Abe . unresolved

I'm confused. For async model, we expect async-ness is handled in server side, not client side, so we should send the xdg API instantly.

Line 241, Patchset 4 (Latest): if (IsSurfaceConfigured()) {
Hidehiko Abe . unresolved

so in the sense, this block should be removed entirely once async model is being made. We expect onWindowStateChanged is called as a reaction to the response from the server.

Line 818, Patchset 4 (Latest): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . unresolved

same as above.

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 476, Patchset 4 (Latest):void WaylandWindowTest::DoMinimizeTest(bool async_state) {
Hidehiko Abe . unresolved

May I ask you a bit help to make this code review more reliable by introducing a intermediate PS that just "moves" the code from TEST_* section below to here, so that "what was changed" conceptually can be highlighted by gerrity? Surely, the patch does not need to be compiled. I'd expect almost no-change, but some small parts may be updated, I think. Using tool is more reliable than diff by my eyes :-)

Line 1546, Patchset 4 (Latest): EXPECT_CALL(*xdg_surface->xdg_toplevel(), SetMaximized()).Times(2);
Hidehiko Abe . unresolved

I don't think we should call this twice...

Open in Gerrit

Related details

Attention is currently required from:
  • Patryk Chodur
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 4
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Patryk Chodur <pch...@google.com>
Gerrit-Comment-Date: Fri, 08 May 2026 09:24:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Patryk Chodur (Gerrit)

unread,
May 8, 2026, 10:47:30 AMMay 8
to Mitsuru Oshima, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Hidehiko Abe

Patryk Chodur added 4 comments

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Hidehiko Abe . unresolved

I'm confused. For async model, we expect async-ness is handled in server side, not client side, so we should send the xdg API instantly.

Line 241, Patchset 4 (Latest): if (IsSurfaceConfigured()) {
Hidehiko Abe . unresolved

so in the sense, this block should be removed entirely once async model is being made. We expect onWindowStateChanged is called as a reaction to the response from the server.

Patryk Chodur

This can be cleared out, thanks for pointing that out. I fixed it in the new revision - xdg_toplevel_->SetMinimized() is used directly only with the feature flag disabled. If it is enabled, we just call `SetWindowState`.

Line 818, Patchset 4 (Latest): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . unresolved

same as above.

Patryk Chodur

The `RequestState` is called so that all the variables related to the state are set properly. We call the OnWindowStateChanged only from configure event though.

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 1546, Patchset 4 (Latest): EXPECT_CALL(*xdg_surface->xdg_toplevel(), SetMaximized()).Times(2);
Hidehiko Abe . unresolved

I don't think we should call this twice...

Patryk Chodur

It is called from Restore() when exiting Fullscreen to Maximized. The whole test flow is
kNormal -> Maximize() -> kMaximized -> SetFullscreen() -> kFullScreen -> Restore() -> kMaximized

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 4
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Fri, 08 May 2026 14:47:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Patryk Chodur (Gerrit)

unread,
May 11, 2026, 5:11:16 PMMay 11
to Mitsuru Oshima, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Hidehiko Abe

Patryk Chodur added 1 comment

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 476, Patchset 4:void WaylandWindowTest::DoMinimizeTest(bool async_state) {
Hidehiko Abe . resolved

May I ask you a bit help to make this code review more reliable by introducing a intermediate PS that just "moves" the code from TEST_* section below to here, so that "what was changed" conceptually can be highlighted by gerrity? Surely, the patch does not need to be compiled. I'd expect almost no-change, but some small parts may be updated, I think. Using tool is more reliable than diff by my eyes :-)

Patryk Chodur

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 7
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Mon, 11 May 2026 21:10:58 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Hidehiko Abe (Gerrit)

unread,
Jun 25, 2026, 5:05:14 AM (4 days ago) Jun 25
to Patryk Chodur, Code Review Nudger, Mitsuru Oshima, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Patryk Chodur

Hidehiko Abe added 4 comments

File ui/ozone/platform/wayland/host/wayland_toplevel_window.h
Line 177, Patchset 9 (Latest): int64_t fullscreen_display_id = display::kInvalidDisplayId);
Hidehiko Abe . unresolved

nit: to avoid accident, could you pass the value always?

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Line 209, Patchset 9 (Parent): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . unresolved

I'm confused. If I understand the consensus on the design doc correctly, we should keep this, because we just want to make this call to xdg_toplevel_ invocation, and do nothing about state management below.

Or, am i misunderstanding the proposal somehow?

Line 228, Patchset 9 (Latest): SetWindowState(PlatformWindowState::kMaximized);
Hidehiko Abe . unresolved

same. We should just call xdg_toplevel_ call here only?

Line 231, Patchset 9 (Latest):void WaylandToplevelWindow::Minimize() {
Hidehiko Abe . unresolved

same here, too.
Ok to keep remembering the minimization request for handling on response from the compositor.

Open in Gerrit

Related details

Attention is currently required from:
  • Patryk Chodur
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 9
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-Attention: Patryk Chodur <pch...@google.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 09:04:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Patryk Chodur (Gerrit)

unread,
Jun 25, 2026, 7:38:17 AM (4 days ago) Jun 25
to Code Review Nudger, Mitsuru Oshima, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Hidehiko Abe

Patryk Chodur added 1 comment

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Line 209, Patchset 9 (Parent): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . unresolved

I'm confused. If I understand the consensus on the design doc correctly, we should keep this, because we just want to make this call to xdg_toplevel_ invocation, and do nothing about state management below.

Or, am i misunderstanding the proposal somehow?

Patryk Chodur

I modified the `SetWindowState` and `TriggerStateChanges` to just check whether the desired state is active and call the `xdg_toplevel_` functions. If you prefer, I can inline them here to make it clearer that we don't want any additional logic.

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 9
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Jun 2026 11:38:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Hidehiko Abe (Gerrit)

unread,
Jun 25, 2026, 9:26:37 AM (4 days ago) Jun 25
to Patryk Chodur, Code Review Nudger, Mitsuru Oshima, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Patryk Chodur

Hidehiko Abe added 1 comment

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Line 209, Patchset 9 (Parent): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . unresolved

I'm confused. If I understand the consensus on the design doc correctly, we should keep this, because we just want to make this call to xdg_toplevel_ invocation, and do nothing about state management below.

Or, am i misunderstanding the proposal somehow?

Patryk Chodur

I modified the `SetWindowState` and `TriggerStateChanges` to just check whether the desired state is active and call the `xdg_toplevel_` functions. If you prefer, I can inline them here to make it clearer that we don't want any additional logic.

Hidehiko Abe

One of the keys of the redesign is to let compositor decide the state, and the decision is async operation. So, if Chrome wants to make a fullscreen, it should send the request to the compositor always, IIUC?

Open in Gerrit

Related details

Attention is currently required from:
  • Patryk Chodur
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 9
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Patryk Chodur <pch...@google.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 13:26:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patryk Chodur <pch...@google.com>
Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Patryk Chodur (Gerrit)

unread,
Jun 25, 2026, 11:05:07 AM (4 days ago) Jun 25
to Code Review Nudger, Mitsuru Oshima, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Hidehiko Abe

Patryk Chodur added 1 comment

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Line 209, Patchset 9 (Parent): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . unresolved

I'm confused. If I understand the consensus on the design doc correctly, we should keep this, because we just want to make this call to xdg_toplevel_ invocation, and do nothing about state management below.

Or, am i misunderstanding the proposal somehow?

Patryk Chodur

I modified the `SetWindowState` and `TriggerStateChanges` to just check whether the desired state is active and call the `xdg_toplevel_` functions. If you prefer, I can inline them here to make it clearer that we don't want any additional logic.

Hidehiko Abe

One of the keys of the redesign is to let compositor decide the state, and the decision is async operation. So, if Chrome wants to make a fullscreen, it should send the request to the compositor always, IIUC?

Patryk Chodur

Right, but the functions `Window::SetFullscreen`, `Window::Maximize`, `Window::Minimize` and `Window::Restore` (declared [here](https://source.chromium.org/chromium/chromium/src/+/main:ui/platform_window/platform_window.h;l=85-88;drc=d503f89588de845f4903558934b7513747b1be95)), which `WaylandToplevelWindow::SetFullscreen`, `WaylandToplevelWindow::Maximize`, `WaylandToplevelWindow::Minimize` and `WaylandToplevelWindow::Restore` override, are defined not as the direct compositor counterparts, but rather as browser-level operations focused on getting to the desired window state.

When the `Window::Maximize` is called, the browser needs to decide what Wayland/XDG Shell operations to call. When the window is minimized prior to maximizing, it'll unminimize the window before maximizing. When the window is in fullscreen mode, it'll close the fullscreen before maximizing. This translation is necessary at some level, as, for example, the exact Restore operation is implemented differently on each platform, but the high level behavior is the same on every platform.

This still enables the compositor to be the source of truth and decide the state. With the changes in this CL we decide which XDG Shell functions to call based on the stored window state, but read the window state and act on any changes directly from the Configure event. Prior to changes in this CL, we called the XDG Shell functions and just assumed the browser switched to the desired state without waiting for any Configure event. We also did some logic (like storing what state should the restore operation switch to) in the request function call, which meant we wouldn't process any of that logic for compositor-initiated changes.

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 9
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Jun 2026 15:04:51 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Patryk Chodur (Gerrit)

unread,
Jun 26, 2026, 7:53:55 AM (3 days ago) Jun 26
to Code Review Nudger, Mitsuru Oshima, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Hidehiko Abe

Patryk Chodur voted and added 8 comments

Votes added by Patryk Chodur

Commit-Queue+1

8 comments

File ui/ozone/platform/wayland/host/wayland_toplevel_window.h
Line 225, Patchset 10 (Parent): int64_t fullscreen_display_id_ = display::kInvalidDisplayId;
Patryk Chodur . resolved

This was cleared on every Configure call, so it essentially acted like a function variable, but stored globally.

Line 177, Patchset 9: int64_t fullscreen_display_id = display::kInvalidDisplayId);
Hidehiko Abe . resolved

nit: to avoid accident, could you pass the value always?

Patryk Chodur

Done. Should we also have explicit parameter for `SetWindowState`?

File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
Line 209, Patchset 9 (Parent): if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . resolved

I'm confused. If I understand the consensus on the design doc correctly, we should keep this, because we just want to make this call to xdg_toplevel_ invocation, and do nothing about state management below.

Or, am i misunderstanding the proposal somehow?

Patryk Chodur

I modified the `SetWindowState` and `TriggerStateChanges` to just check whether the desired state is active and call the `xdg_toplevel_` functions. If you prefer, I can inline them here to make it clearer that we don't want any additional logic.

Hidehiko Abe

One of the keys of the redesign is to let compositor decide the state, and the decision is async operation. So, if Chrome wants to make a fullscreen, it should send the request to the compositor always, IIUC?

Patryk Chodur

Right, but the functions `Window::SetFullscreen`, `Window::Maximize`, `Window::Minimize` and `Window::Restore` (declared [here](https://source.chromium.org/chromium/chromium/src/+/main:ui/platform_window/platform_window.h;l=85-88;drc=d503f89588de845f4903558934b7513747b1be95)), which `WaylandToplevelWindow::SetFullscreen`, `WaylandToplevelWindow::Maximize`, `WaylandToplevelWindow::Minimize` and `WaylandToplevelWindow::Restore` override, are defined not as the direct compositor counterparts, but rather as browser-level operations focused on getting to the desired window state.

When the `Window::Maximize` is called, the browser needs to decide what Wayland/XDG Shell operations to call. When the window is minimized prior to maximizing, it'll unminimize the window before maximizing. When the window is in fullscreen mode, it'll close the fullscreen before maximizing. This translation is necessary at some level, as, for example, the exact Restore operation is implemented differently on each platform, but the high level behavior is the same on every platform.

This still enables the compositor to be the source of truth and decide the state. With the changes in this CL we decide which XDG Shell functions to call based on the stored window state, but read the window state and act on any changes directly from the Configure event. Prior to changes in this CL, we called the XDG Shell functions and just assumed the browser switched to the desired state without waiting for any Configure event. We also did some logic (like storing what state should the restore operation switch to) in the request function call, which meant we wouldn't process any of that logic for compositor-initiated changes.

Patryk Chodur

I changed the implementation to call the XdgToplevel functions from `WaylandToplevelWindow::SetFullscreen`, `WaylandToplevelWindow::Maximize`, `WaylandToplevelWindow::Minimize` and `WaylandToplevelWindow::Restore`, but keeping the current logic for evaluating which `XdgToplevel` functions to call.

Hidehiko Abe . resolved
Patryk Chodur

Not relevant anymore, it's not implemented directly in the method.

Line 228, Patchset 9: SetWindowState(PlatformWindowState::kMaximized);
Hidehiko Abe . resolved

same. We should just call xdg_toplevel_ call here only?

Patryk Chodur

Now we call it directly.

Line 231, Patchset 9:void WaylandToplevelWindow::Minimize() {
Hidehiko Abe . resolved

same here, too.
Ok to keep remembering the minimization request for handling on response from the compositor.

Patryk Chodur

Done

Line 241, Patchset 4: if (IsSurfaceConfigured()) {
Hidehiko Abe . resolved

so in the sense, this block should be removed entirely once async model is being made. We expect onWindowStateChanged is called as a reaction to the response from the server.

Patryk Chodur

This can be cleared out, thanks for pointing that out. I fixed it in the new revision - xdg_toplevel_->SetMinimized() is used directly only with the feature flag disabled. If it is enabled, we just call `SetWindowState`.

Patryk Chodur

Not relevant anymore - the implementation was changed to a one that calls the `XdgToplevel` functions immediately.

Line 818, Patchset 4: if (base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)) {
Hidehiko Abe . resolved

same as above.

Patryk Chodur

The `RequestState` is called so that all the variables related to the state are set properly. We call the OnWindowStateChanged only from configure event though.

Patryk Chodur

Changed the implementation, it's not relevant anymore.

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
Gerrit-Change-Number: 7806516
Gerrit-PatchSet: 10
Gerrit-Owner: Patryk Chodur <pch...@google.com>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Fri, 26 Jun 2026 11:53:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Patryk Chodur (Gerrit)

unread,
Jun 26, 2026, 7:55:49 AM (3 days ago) Jun 26
to Code Review Nudger, Mitsuru Oshima, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
Attention needed from Hidehiko Abe

Patryk Chodur added 1 comment

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 1546, Patchset 4: EXPECT_CALL(*xdg_surface->xdg_toplevel(), SetMaximized()).Times(2);
Hidehiko Abe . resolved

I don't think we should call this twice...

Patryk Chodur

It is called from Restore() when exiting Fullscreen to Maximized. The whole test flow is
kNormal -> Maximize() -> kMaximized -> SetFullscreen() -> kFullScreen -> Restore() -> kMaximized

Patryk Chodur

Resolving for reasons described above. The Maximize is called first on `Maximize()`, and then on `Restore()` to make sure we're in the maximized state.

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
    Gerrit-Change-Number: 7806516
    Gerrit-PatchSet: 10
    Gerrit-Owner: Patryk Chodur <pch...@google.com>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Jun 2026 11:55:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hidehiko Abe (Gerrit)

    unread,
    Jun 26, 2026, 5:49:33 PM (3 days ago) Jun 26
    to Patryk Chodur, Code Review Nudger, Mitsuru Oshima, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, ozone-...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, pwa-com...@google.com
    Attention needed from Patryk Chodur

    Hidehiko Abe added 3 comments

    File ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
    Line 267, Patchset 10 (Latest): return;
    Hidehiko Abe . unresolved

    nit: return is not needed.

    Line 282, Patchset 10 (Latest): if (!xdg_toplevel_) {
    return;
    }
    Hidehiko Abe . unresolved

    nit: this was done at L274.

    File ui/ozone/platform/wayland/host/wayland_window.cc
    Line 264, Patchset 10 (Latest): float new_ui_scale = connection_->window_manager()->DetermineUiScale();
    if (state.window_scale == new_scale && state.ui_scale == new_ui_scale) {
    return;
    }
    Hidehiko Abe . unresolved

    clarification: is this related to async work...? Could you elaborate details in the commit message?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Patryk Chodur
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I96c443777480ea3908eadffc32b6c3dd6a6a6964
      Gerrit-Change-Number: 7806516
      Gerrit-PatchSet: 10
      Gerrit-Owner: Patryk Chodur <pch...@google.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Patryk Chodur <pch...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-CC: Mitsuru Oshima <osh...@chromium.org>
      Gerrit-Attention: Patryk Chodur <pch...@google.com>
      Gerrit-Comment-Date: Fri, 26 Jun 2026 21:49:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages