wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
324 stars 16 forks source link

Need to directly commit the wl_surface in some cases #143

Open Tamaranch opened 1 year ago

Tamaranch commented 1 year ago

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.

wmww commented 1 year ago

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.

RossComputerGuy commented 1 year ago

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?

wmww commented 1 year ago

@RossComputerGuy does the workaround in #167 help?

RossComputerGuy commented 1 year ago

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