From 071ea49248bdca31ed3d0877bc4841b11625a24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= <737941+loic-sharma@users.noreply.github.com> Date: Wed, 31 May 2023 16:42:54 -0700 Subject: [PATCH] [Windows] Address feedback for show window comment (#127998) Address Tong's feedback here: https://github.com/flutter/flutter/issues/127695#issuecomment-1564884872 Follow-up to: https://github.com/flutter/flutter/pull/127046 --- .../windows/runner/flutter_window.cpp | 4 ++-- .../ui/windows/runner/flutter_window.cpp | 4 ++-- .../windows/runner/flutter_window.cpp | 4 ++-- .../windows/runner/flutter_window.cpp | 4 ++-- .../windows/runner/flutter_window.cpp | 4 ++-- .../windows/runner/flutter_window.cpp | 4 ++-- .../layers/windows/runner/flutter_window.cpp | 4 ++-- .../windows/runner/flutter_window.cpp | 4 ++-- .../migrations/show_window_migration.dart | 4 ++-- .../windows.tmpl/runner/flutter_window.cpp | 4 ++-- .../migrations/show_window_migration_test.dart | 16 ++++++++-------- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/dev/integration_tests/flutter_gallery/windows/runner/flutter_window.cpp b/dev/integration_tests/flutter_gallery/windows/runner/flutter_window.cpp index 7f66913a02..252aa26786 100644 --- a/dev/integration_tests/flutter_gallery/windows/runner/flutter_window.cpp +++ b/dev/integration_tests/flutter_gallery/windows/runner/flutter_window.cpp @@ -36,8 +36,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/dev/integration_tests/ui/windows/runner/flutter_window.cpp b/dev/integration_tests/ui/windows/runner/flutter_window.cpp index 7f66913a02..252aa26786 100644 --- a/dev/integration_tests/ui/windows/runner/flutter_window.cpp +++ b/dev/integration_tests/ui/windows/runner/flutter_window.cpp @@ -36,8 +36,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/dev/integration_tests/windows_startup_test/windows/runner/flutter_window.cpp b/dev/integration_tests/windows_startup_test/windows/runner/flutter_window.cpp index d7ab09e986..33480aef23 100644 --- a/dev/integration_tests/windows_startup_test/windows/runner/flutter_window.cpp +++ b/dev/integration_tests/windows_startup_test/windows/runner/flutter_window.cpp @@ -64,8 +64,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); // Create a method channel to check the window's visibility. diff --git a/dev/manual_tests/windows/runner/flutter_window.cpp b/dev/manual_tests/windows/runner/flutter_window.cpp index 7f66913a02..252aa26786 100644 --- a/dev/manual_tests/windows/runner/flutter_window.cpp +++ b/dev/manual_tests/windows/runner/flutter_window.cpp @@ -36,8 +36,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/examples/flutter_view/windows/runner/flutter_window.cpp b/examples/flutter_view/windows/runner/flutter_window.cpp index 7f66913a02..252aa26786 100644 --- a/examples/flutter_view/windows/runner/flutter_window.cpp +++ b/examples/flutter_view/windows/runner/flutter_window.cpp @@ -36,8 +36,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/examples/hello_world/windows/runner/flutter_window.cpp b/examples/hello_world/windows/runner/flutter_window.cpp index 7f66913a02..252aa26786 100644 --- a/examples/hello_world/windows/runner/flutter_window.cpp +++ b/examples/hello_world/windows/runner/flutter_window.cpp @@ -36,8 +36,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/examples/layers/windows/runner/flutter_window.cpp b/examples/layers/windows/runner/flutter_window.cpp index 7f66913a02..252aa26786 100644 --- a/examples/layers/windows/runner/flutter_window.cpp +++ b/examples/layers/windows/runner/flutter_window.cpp @@ -36,8 +36,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/examples/platform_channel/windows/runner/flutter_window.cpp b/examples/platform_channel/windows/runner/flutter_window.cpp index 21a907935b..97c041167a 100644 --- a/examples/platform_channel/windows/runner/flutter_window.cpp +++ b/examples/platform_channel/windows/runner/flutter_window.cpp @@ -99,8 +99,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/packages/flutter_tools/lib/src/windows/migrations/show_window_migration.dart b/packages/flutter_tools/lib/src/windows/migrations/show_window_migration.dart index 0e888b695f..bebb5ecaad 100644 --- a/packages/flutter_tools/lib/src/windows/migrations/show_window_migration.dart +++ b/packages/flutter_tools/lib/src/windows/migrations/show_window_migration.dart @@ -20,8 +20,8 @@ const String _after = r''' }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/flutter_window.cpp b/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/flutter_window.cpp index 46c3e636f1..955ee3038f 100644 --- a/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/flutter_window.cpp +++ b/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/flutter_window.cpp @@ -32,8 +32,8 @@ bool FlutterWindow::OnCreate() { }); // Flutter can complete the first frame before the "show window" callback is - // registered. Ensure a frame is pending to ensure the window is shown. - // This no-ops if the first frame hasn't completed yet. + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. flutter_controller_->ForceRedraw(); return true; diff --git a/packages/flutter_tools/test/general.shard/windows/migrations/show_window_migration_test.dart b/packages/flutter_tools/test/general.shard/windows/migrations/show_window_migration_test.dart index 2f86e265fc..85db407f2e 100644 --- a/packages/flutter_tools/test/general.shard/windows/migrations/show_window_migration_test.dart +++ b/packages/flutter_tools/test/general.shard/windows/migrations/show_window_migration_test.dart @@ -75,8 +75,8 @@ void main () { ' });\n' '\n' ' // Flutter can complete the first frame before the "show window" callback is\n' - ' // registered. Ensure a frame is pending to ensure the window is shown.\n' - " // This no-ops if the first frame hasn't completed yet.\n" + ' // registered. The following call ensures a frame is pending to ensure the\n' + " // window is shown. It is a no-op if the first frame hasn't completed yet.\n" ' flutter_controller_->ForceRedraw();\n' '\n' ' return true;\n'; @@ -103,8 +103,8 @@ void main () { ' });\r\n' '\r\n' ' // Flutter can complete the first frame before the "show window" callback is\r\n' - ' // registered. Ensure a frame is pending to ensure the window is shown.\r\n' - " // This no-ops if the first frame hasn't completed yet.\r\n" + ' // registered. The following call ensures a frame is pending to ensure the\r\n' + " // window is shown. It is a no-op if the first frame hasn't completed yet.\r\n" ' flutter_controller_->ForceRedraw();\r\n' '\r\n' ' return true;\r\n'; @@ -145,8 +145,8 @@ void main () { ' });\n' '\n' ' // Flutter can complete the first frame before the "show window" callback is\n' - ' // registered. Ensure a frame is pending to ensure the window is shown.\n' - " // This no-ops if the first frame hasn't completed yet.\n" + ' // registered. The following call ensures a frame is pending to ensure the\n' + " // window is shown. It is a no-op if the first frame hasn't completed yet.\n" ' flutter_controller_->ForceRedraw();\n' '\n' ' return true;\n' @@ -176,8 +176,8 @@ void main () { ' });\r\n' '\r\n' ' // Flutter can complete the first frame before the "show window" callback is\r\n' - ' // registered. Ensure a frame is pending to ensure the window is shown.\r\n' - " // This no-ops if the first frame hasn't completed yet.\r\n" + ' // registered. The following call ensures a frame is pending to ensure the\r\n' + " // window is shown. It is a no-op if the first frame hasn't completed yet.\r\n" ' flutter_controller_->ForceRedraw();\r\n' '\r\n' ' return true;\r\n'