diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-05-25 18:37:43 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-05-25 18:37:43 +0200 |
| commit | 7fcd4b73d700d04b2bb6a758bd542c324a6e2aed (patch) | |
| tree | 92f9630f3e2dbb060054afe145bae9c913da43b5 /src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | |
| parent | a118732f7c10da03196ebd9207007686163114f4 (diff) | |
Wayland platform: more accurate procedure to map a GL (sub)window.
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 66183d647..ab1b37964 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -231,16 +231,17 @@ void Fl_Wayland_Gl_Window_Driver::make_current_before() { egl_surface = eglCreateWindowSurface(egl_display, g->egl_conf, egl_window, NULL); //fprintf(stderr, "Created egl surface=%p at scale=%d\n", egl_surface, win->scale); wl_surface_set_buffer_scale(surface, win->scale); - // Tested apps: shape, glpuzzle, cube, fractals, gl_overlay, fullscreen, - // OpenGL3-glut-test, OpenGL3test - // Tested wayland compositors: mutter, kde-plasma, weston, sway on FreeBSD - // Origin of the value 3 below : - // All tests run OK with value 3 whereas some tests fail with 2, e.g., - // glpuzzle + KDE, glpuzzle + sway sometimes. - for (int count = 0; count < 3; count++) { - wl_display_roundtrip(Fl_Wayland_Screen_Driver::wl_display); - eglSwapBuffers(Fl_Wayland_Gl_Window_Driver::egl_display, egl_surface); + // Tested apps: shape, glpuzzle, cube, fractals, gl_overlay, fullscreen, unittests, + // OpenGL3-glut-test, OpenGL3test. + // Tested wayland compositors: mutter, kde-plasma, weston, sway on FreeBSD. + // Origin of the 3 "roundtrips" below : + // All tests run OK with code below but glpuzzle, OpenGL3-glut-test and gl_overlay + // fail sometimes under KDE and sway without the 3rd roundtrip. + wl_display_roundtrip(Fl_Wayland_Screen_Driver::wl_display); + wl_display_roundtrip(Fl_Wayland_Screen_Driver::wl_display); + if (!pWindow->parent() || overlay()) { wl_display_roundtrip(Fl_Wayland_Screen_Driver::wl_display); } + eglSwapBuffers(Fl_Wayland_Gl_Window_Driver::egl_display, egl_surface); } } |
