summaryrefslogtreecommitdiffstats
path: root/revert-mutter-wayland-regression.patch
blob: e80e72c2e1d6368ad0a6d03b625c6df20524857d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From ac7d143e1d9eca969b3f23a7fa9d022577ae6005 Mon Sep 17 00:00:00 2001
From: Alexander Dunaev <adunaev@igalia.com>
Date: Mon, 15 Aug 2022 11:12:21 +0000
Subject: [PATCH] Revert "wayland: Commit surface after configure with same size"

This reverts commit 32e27b753bfb2e99232c1bb303f07283ab248ea3.

Reason for revert: this change caused a major regression on mutter Wayland compositor.

Original change's description:
> wayland: Commit surface after configure with same size
>
> The configure -> ack sequence doesn't take effect on the server side
> until the associated surface is committed.
>
> Fixes a sync issue in TabDragging/* tests on lacros that reposition
> windows during test setup, where lacros and exo have different screen
> positions for a surface.
>
> Bug: 1336691, 1336706
> Change-Id: I8d34f23ece4808bb56d8bc01712d4488bf472359
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3714566
> Reviewed-by: Kramer Ge <fangzhoug@chromium.org>
> Commit-Queue: River Gilhuly <rivr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1023916}

Bug: 1336691, 1336706
Change-Id: Ia88538e5645da5a65d0c1073c672f1f3bfbc4c54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3831855
Auto-Submit: Alexander Dunaev <adunaev@igalia.com>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1035020}
---

diff --git a/ui/ozone/platform/wayland/host/wayland_window.cc b/ui/ozone/platform/wayland/host/wayland_window.cc
index f4e616b2..fb95e498 100644
--- a/ui/ozone/platform/wayland/host/wayland_window.cc
+++ b/ui/ozone/platform/wayland/host/wayland_window.cc
@@ -950,7 +950,7 @@
     // window has been applied.
     SetWindowGeometry(pending_bounds_dip_);
     AckConfigure(serial);
-    root_surface()->Commit();
+    connection()->ScheduleFlush();
   } else if (!pending_configures_.empty() &&
              pending_bounds_dip_.size() ==
                  pending_configures_.back().bounds_dip.size()) {
diff --git a/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc b/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc
index 7a1a95d..58804a0 100644
--- a/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc
+++ b/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc
@@ -1112,9 +1112,7 @@
     EXPECT_CALL(*xdg_surface, AckConfigure(_)).Times(1);
     EXPECT_CALL(*mock_surface, Attach(_, _, _)).Times(1);
     EXPECT_CALL(*mock_surface, Frame(_)).Times(1);
-    // Commit() can be called a second time as part of the configure -> ack
-    // sequence.
-    EXPECT_CALL(*mock_surface, Commit()).Times(testing::Between(1, 2));
+    EXPECT_CALL(*mock_surface, Commit()).Times(1);
 
     ActivateSurface(mock_surface->xdg_surface());
     Sync();