Describe the bug
When my video player application runs, it stutters and eventually hangs.
I am unable to reproduce it with the simple examples. However, I traced the problem to two functions. First, the stuttering happens in:
Fl_Gl_Wayland_Gl_Window_Driver::swap_buffers() when it calls:
wl_display_read_events(fl_wl_display()); // this stops the event loop for some seconds and then continues.
The hanging, happens eventually when calling fd_callback() in:
It is unclear to me if one is the reason for the other.
I commented all the Wayland code in swap_buffers() right before eglSwapBuffers and replaced wl_display_dispatch for wl_display_dispatch_pending and then I was able to play my movie without stuttering or blocking. This, of course, is not the solution as the demo programs became unresponsive to the mouse and my application would crash sometimes when leaving the main window and entering it again.
I expect Wayland to work as X11 does, playing my movie without stuttering or blocking.
I don't have screenshots, but I have my application free to download and compile with just a simple runme.sh script. It takes about 20 mins to compile, thou.
- Version: 1.4.0 HEAD
- Installed as package from: git
FLTK Configure / Build Options
include( ExternalProject )
set( FLTK_TAG master )
set( patch_cmd )
if (APPLE OR WIN32)
set( wayland OFF )
set( pango OFF )
set( wayland ON ) # we'll leave it on, albet it is way too buggy.
set( pango ON )
Operating System / Platform:
Ubuntu 22.04 on Wayland
Linux/Unix Runtime, if applicable:
Add any other context about the problem here.