diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-30 15:53:33 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-30 16:46:57 +0300 |
commit | 7c98632289ead480c3d8d28f47815078a4d4c329 (patch) | |
tree | 516db8b49928dc4d277650f148add1b1ee35ddf9 /intern | |
parent | cfd087673dfc74c411d5aeadc8b8c61ce1b05b9f (diff) |
GHOST/Wayland: use flush instead of roundtrip
Using flush avoids handling new events which complicates logic here.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWayland.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |