<div dir="ltr"><div><div><div><div>Hi,<br></div>Based on the wayland protocol specification for wl_surface::attach<br>>>If wl_surface.attach is sent with a NULL wl_buffer, the
following wl_surface.commit will remove the surface content.<br><br></div>Wondering if wl_surface_attach called with wl_buffer=NULL, will there be any wl_buffer release event or frame callbacks?<br><br></div>Modified the redraw in simple-shm.c as below and not receiving any callback or buffer release. It just got stuck.<br></div><div>The same thing is being done in qtwayland to hide the surface and it is getting stuck. Some help to check this case would be helpful.<br><br></div><div>static int odd = 1;<br>if(odd == 1){<br>Â Â Â Â Â Â wl_surface_attach(window->surface, buffer->buffer, 0, 0);<br>Â Â Â Â Â Â Â wl_surface_damage(window->surface,<br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 20, 20, window->width - 40, window->height - 40);Â Â Â Â Â Â <br>Â Â Â Â Â Â odd = 0;<br>Â Â Â }<br>Â Â Â else{<br>Â Â Â Â Â Â Â Â Â Â Â wl_surface_attach(window->surface, 0, 0, 0);<br>Â Â Â Â Â Â Â Â Â Â Â wl_surface_damage(window->surface,<br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 0, 0, 0, 0);<br>Â Â Â Â Â Â Â Â Â Â Â odd=1;Â Â Â Â Â Â Â Â Â Â Â <br>Â Â Â }<br><br></div><br><br>[823379.816]Â -> wl_compositor@4.create_surface(new id wl_surface@3)<br>[823379.949]Â -> xdg_shell@6.get_xdg_surface(new id xdg_surface@7, wl_surface@3)<br>[823380.120]Â -> xdg_surface@7.set_title("simple-shm")<br>[823380.244]Â -> wl_surface@3.damage(0, 0, 250, 250)<br>[823381.333]Â -> wl_shm@5.create_pool(new id wl_shm_pool@8, fd 5, 250000)<br>[823381.561]Â -> wl_shm_pool@8.create_buffer(new id wl_buffer@9, 0, 250, 250, 1000, 1)<br>[823381.870]Â -> wl_shm_pool@8.destroy()<br>[823384.880]Â -> wl_surface@3.attach(wl_buffer@9, 0, 0)<br>[823385.095]Â -> wl_surface@3.damage(20, 20, 210, 210)<br>[823385.317]Â -> wl_surface@3.frame(new id wl_callback@10)<br>[823385.443]Â -> wl_surface@3.commit()<br>[823388.852] wl_display@1.delete_id(8)<br>[823388.979] xdg_surface@7.configure(0, 0, array, 4)<br>[823389.238]Â -> xdg_surface@7.ack_configure(4)<br>[823401.773] wl_display@1.delete_id(10)<br>[823401.908] wl_buffer@9.release()<br>[823401.991] wl_callback@10.done(4056537)<br>[823404.239]Â -> wl_surface@3.attach(nil, 0, 0)<br>[823404.442]Â -> wl_surface@3.damage(0, 0, 0, 0)<br>[823404.663]Â -> wl_surface@3.frame(new id wl_callback@10)<br>[823404.792]Â -> wl_surface@3.commit()<br>[823406.292] xdg_surface@7.configure(0, 0, array, 5)<br>[823406.524]Â -> xdg_surface@7.ack_configure(5)<br><br></div>