gtk-layer-shell icon indicating copy to clipboard operation
gtk-layer-shell copied to clipboard

Need to directly commit the wl_surface in some cases

Open Tamaranch opened this issue 3 years ago • 4 comments

Since https://github.com/wmww/gtk-layer-shell/pull/52 the wl_surface is not committed directly but it is left to GTK to do it if necessary.

However, it seems that in some cases, like when negative (or large enough) margins are set so that the surface leaves the screen, a direct commit is needed to make it come back. See https://github.com/WayfireWM/wayfire/issues/1656.

Forcing a direct commit also solves a similar problem I reported for Labwc a little while ago: https://github.com/labwc/labwc/issues/499.

Tamaranch avatar Dec 10 '22 15:12 Tamaranch

Yes, what's happening is the surface isn't getting a .frame wayland event, so GTK isn't committing. I think setting _GdkWindowImplWayland::pending_commit to TRUE (via the system we already have to access private GTK internals) might fix the problem, need to investigate more.

wmww avatar Dec 14 '22 23:12 wmww

I think I'm experiencing this issue. I am using Flutter with gtk-layer-shell to make a virtual keyboard and after the initial render, the surface isn't updating. Any updates on this?

RossComputerGuy avatar Jun 07 '23 00:06 RossComputerGuy

@RossComputerGuy does the workaround in #167 help?

wmww avatar Jun 07 '23 17:06 wmww

I don't think I'm able to test that out since I am using the bitsdojo_window library which overrides certain things.

RossComputerGuy avatar Jun 07 '23 23:06 RossComputerGuy