[Bf-blender-cvs] [7c98632289e] master: GHOST/Wayland: use flush instead of roundtrip
Campbell Barton
noreply at git.blender.org
Thu Jun 30 15:49:17 CEST 2022
Commit: 7c98632289ead480c3d8d28f47815078a4d4c329
Author: Campbell Barton
Date: Thu Jun 30 22:53:33 2022 +1000
Branches: master
https://developer.blender.org/rB7c98632289ead480c3d8d28f47815078a4d4c329
GHOST/Wayland: use flush instead of roundtrip
Using flush avoids handling new events which complicates logic here.
===================================================================
M intern/ghost/intern/GHOST_WindowWayland.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp
index 27c2a09465d..27bda5ea41e 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -721,7 +721,7 @@ GHOST_WindowWayland::~GHOST_WindowWayland()
/* NOTE(@campbellbarton): This is needed so the appropriate handlers event
* (#wl_surface_listener.leave in particular) run to prevent access to the freed surfaces.
- * Without this round-trip, calling #getCursorPosition immediately after closing a window
+ * Without flushing the display, calling #getCursorPosition immediately after closing a window
* causes dangling #wl_surface pointers to be accessed
* (since the window is used for scaling the cursor position).
*
@@ -731,7 +731,7 @@ GHOST_WindowWayland::~GHOST_WindowWayland()
* Any information requested in this state (such as the cursor position) won't be valid and
* could cause difficult to reproduce bugs. So perform a round-trip as closing a window isn't
* an action that runs continuously & isn't likely to cause unnecessary overhead. See: T99078. */
- wl_display_roundtrip(m_system->display());
+ wl_display_flush(m_system->display());
delete w;
}
More information about the Bf-blender-cvs
mailing list