Bad input lag in GNOME Wayland when run in fullscreen
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
Hi,
Tux Paint exhibits unusable input lag on GNOME (Wayland) when painting with the brush or any tool with a dynamically updated cursor. The problem happens only in fullscreen.
Every mouse motion event during painting triggers brush_draw() and finishes with SDL_RendererPresent() to update the screen. Unfortunately, each call to SDL_RendererPresent() waits for VSync and this produces the horrible lag.
I've tried to use the following without success:
SDL_SetHint(SDL_HINT_RENDER_VSYNC, "0")and SDL_RenderSetVSync(renderer, 0);Moving forward, I think Tux Paint's responsiveness could be improved by completing moving away from the rendering assumptions made in SDL 1.2 and decoupling frame rate from input rate.
Hi, thanks for reporting this,
this issue reminds me a report that came on a private mail, sumaryzing:
lag in fullscreen, work in windowed mode, run in Arch Linux (which uses SDL3 via sdl2-compat) with Plasma and a very high resolution mouse.
The user fixed it for himself by lowering the mouse resolution, and we added a filter in tuxpaint.c to discard very small mouse events.
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/8c6f8a9dc3aa7f778efc263ed1a73c1401c1060c/
If you can compile Tux Paint from source, you could try if latest source solves also the lag on your computer.
HTH
Pere