From c5caffd0a538d14acce92e900cf6f29386fdd4eb Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 8 Mar 2019 11:31:58 -0800 Subject: [PATCH] Unify the GLFW event loop code The use of glfwWaitEvents() on Windows was incorrect, since there are event sources such as plugin messages that GLFW is unaware of. --- library/common/glfw/embedder.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/common/glfw/embedder.cc b/library/common/glfw/embedder.cc index cf4ab1ceb..06e4917c5 100644 --- a/library/common/glfw/embedder.cc +++ b/library/common/glfw/embedder.cc @@ -532,13 +532,11 @@ void FlutterEmbedderRunWindowLoop(FlutterWindowRef flutter_window) { XInitThreads(); #endif while (!glfwWindowShouldClose(window)) { -#ifdef __linux__ glfwPollEvents(); +#ifdef __linux__ if (gtk_events_pending()) { gtk_main_iteration(); } -#else - glfwWaitEvents(); #endif // TODO(awdavies): This will be deprecated soon. __FlutterEngineFlushPendingTasksNow();