So I reckon the problem is because in Wayland, we update the surface when a new buffer is received.
So what happens is, gdk_window_move_resize() clears the frame background, a new buffer is attached once the Xwindow is resized, MetaSurfaceActorWayland repaints using that buffer with the black frame, while repaint of the shadows still awaits for the sync of the client, thus delaying the repaint of the shadows. In the mean time, the black shadows have been seen.
So I reckon the problem is because in Wayland, we update the surface when a new buffer is received.
So what happens is, gdk_window_ move_resize( ) clears the frame background, a new buffer is attached once the Xwindow is resized, MetaSurfaceActo rWayland repaints using that buffer with the black frame, while repaint of the shadows still awaits for the sync of the client, thus delaying the repaint of the shadows. In the mean time, the black shadows have been seen.
Or something around these lines...