+ /* If we changed the window type, we might have to set or
+ * unset the frame clock on the window
+ */
+ if (GDK_WINDOW_TYPE (new_parent) == GDK_WINDOW_ROOT &&
+ GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
+ {
+ if (window->frame_clock == NULL)
+ {
+ GdkFrameClock *frame_clock = g_object_new (GDK_TYPE_FRAME_CLOCK_IDLE, NULL);
+ gdk_window_set_frame_clock (window, frame_clock);
+ }
+ }
+ else
+ {
+ if (window->frame_clock != NULL)
+ {
+ g_object_run_dispose (G_OBJECT (window->frame_clock));
+ gdk_window_set_frame_clock (window, NULL);
+ }
+ }
+