420ed353b5
The fix for bug 1750 inside commit b190448e made Clutter-GTK spew BadWindow errors. The reason for that is that we call XDestroyWindow() without checking if the old Window is None; this happens if we call clutter_x11_set_stage_foreign() on a new ClutterStage before it has been realized. Since Clutter-GTK does not need to realize the Stage it is going to embed anymore (the only reason for that was to obtain a proper Visual but now there's ClutterBackendX11 API for that), the set_stage_foreign() call is effectively setting the StageX11 Window for the first time.