From 2ee688dae94ee22e84075886b08134d5e057f2e4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 10 Mar 2023 10:17:20 +0100 Subject: Improve member function Fl_Wayland_Gl_Window_Driver::make_current_before() --- src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 8efbae5ff..7c3894440 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -303,9 +303,8 @@ void Fl_Wayland_Gl_Window_Driver::make_current_before() { // Tested apps: shape, glpuzzle, cube, fractals, gl_overlay, fullscreen, unittests, // OpenGL3-glut-test, OpenGL3test. // Tested wayland compositors: mutter, kde-plasma, weston, sway on FreeBSD. - wl_display_roundtrip(fl_wl_display()); - wl_display_roundtrip(fl_wl_display()); - wl_display_roundtrip(fl_wl_display()); // necessary for gl_overlay + if (pWindow->parent()) win = fl_wl_xid(pWindow->top_window()); + while (!win->xdg_surface) wl_display_roundtrip(fl_wl_display()); } } -- cgit v1.2.3