X11 window contents are sluggish until window is moved
Steps to reproduce
- Run a gtk4 program using the X11 backend. For my bisection I used
examples/plugman
, but the bug repros with pretty much anything, e.g. the hello world example from the docs. - Try to interact with the widgets, e.g. typing into a text view or clicking on a button.
- Observe that the UI is sluggish, as though the system were under high load (it isn't though).
- Click and drag in the header bar to move the window.
- Interact with widgets again and observe that everything is now at normal speed.
Version information
I reproduced this on on current master (d786e1d6). I bisected the problem to 13d3afa5, "Remove unused GDK_HINT_POS".
The important change seems to be in gdk/x11/gdksurface-x11.c
where size_hints.flags |= PPosition
is set. Before this commit it was guarded with if (geom_mask & GDK_HINT_POS)
, so I assume never getting called. Back on current master
, if I comment out the line setting the PPosition
flag the UI is fast at startup again.
OS: Fedora 33
Edited by Nicholas Bishop