Fix protocol error caused by sending xdg_shell configure events too early
This PR fixes issue #34.
Sending xdg_toplevel->configure and xdg_surface->configure before receiving zwlr_layer_shell_surface_v1->configure causes GTK to think the surface is already configured and can result in GTK attaching a buffer too early. This causes a protocol error as buffers can only be attached to surfaces that have been configured.
See more in the discussion of the linked issue.
Note: this doesn't completely fix the issue. Testing with the SwayOSD GTK4 port shows that changing output scale sometimes still leads to protocol errors after hiding and showing the window again. I suppose this doesn't only have to do with the initial configure, but likely all configures. Needs further debugging.
It looks like the second time (with a new layer_surface but the same wl_surface) there is no configure event and GTK attaches a buffer anyway, need to add logging from inside gtk4-layer-shell again to confirm this.
Note: this doesn't completely fix the issue. Testing with the SwayOSD GTK4 port shows that changing output scale sometimes still leads to protocol errors after hiding and showing the window again
I failed to notice that a zwlr_layer_surface can get destroyed and recreated during the lifetime of a gtk4_layer_shell layer_surface. Resetting the has_initial_layer_shell_configure flag when creating a new zwlr_layer_surface fixes the issue.
Should be ok to review now.