Created attachment 1239064 [details] testcase Description of problem: See the attached testcase, redraw() func. When wl_surface_frame() is obtained from wl_subsurface, it's not fired. Both parent and subsurface are shown and visible. That hits Firefox which needs to draw to wl_subsurface off main thread and needs to use the frame callback for that. Jonas suggested it's a compositor bug, not sure what is a correct component for that.
Created attachment 1241821 [details] main wl_surface testcase The bug is reproducible even without wl_subsurface. If I attach frame callback to wl_surface owned by GdkWindow I get the frame events only when Gdk redraws the window (window resize for instance). Otherwise I get nothing.
Seems it works for me in both gnome-shell/mutter and weston, using attachment 1241821 [details] I get the initial redraw, then more redoaws when actuall redrawn (ie resizing, changing focus, etc.
For reference: https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface "The frame request will take effect on the next wl_surface.commit. The notification will only be posted for one frame unless requested again. For a wl_surface, the notifications are posted in the order the frame requests were committed." So in this case, we do get the frame callback when gdk commits the surface.
Thanks, closing as notabug.