GdkSurface *parent)
{
GdkSurface *surface;
- GdkFrameClock *frame_clock;
-
- if (parent)
- frame_clock = g_object_ref (gdk_surface_get_frame_clock (parent));
- else
- frame_clock = _gdk_frame_clock_idle_new ();
switch (surface_type)
{
case GDK_SURFACE_TOPLEVEL:
surface = g_object_new (GDK_TYPE_X11_TOPLEVEL,
"display", display,
- "frame-clock", frame_clock,
NULL);
break;
case GDK_SURFACE_POPUP:
surface = g_object_new (GDK_TYPE_X11_POPUP,
"parent", parent,
"display", display,
- "frame-clock", frame_clock,
NULL);
break;
case GDK_SURFACE_DRAG:
surface = g_object_new (GDK_TYPE_X11_DRAG_SURFACE,
"display", display,
- "frame-clock", frame_clock,
NULL);
break;
default:
break;
}
- g_object_unref (frame_clock);
-
return surface;
}
x11_surface->override_redirect = TRUE;
+ gdk_surface_set_frame_clock (surface, gdk_surface_get_frame_clock (surface->parent));
+
G_OBJECT_CLASS (gdk_x11_popup_parent_class)->constructed (object);
gdk_x11_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_MENU);
{
GdkX11Surface *x11_surface = GDK_X11_SURFACE (object);
GdkSurface *surface = GDK_SURFACE (x11_surface);
+ GdkFrameClock *frame_clock;
XSetWindowAttributes xattributes;
long xattributes_mask;
gdk_x11_surface_create_window (x11_surface, &xattributes, xattributes_mask);
+ frame_clock = _gdk_frame_clock_idle_new ();
+ gdk_surface_set_frame_clock (surface, frame_clock);
+ g_object_unref (frame_clock);
+
G_OBJECT_CLASS (gdk_x11_toplevel_parent_class)->constructed (object);
gdk_x11_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_NORMAL);
gdk_x11_drag_surface_constructed (GObject *object)
{
GdkX11Surface *x11_surface = GDK_X11_SURFACE (object);
+ GdkSurface *surface = GDK_SURFACE (object);
+ GdkFrameClock *frame_clock;
XSetWindowAttributes xattributes;
long xattributes_mask;
x11_surface->override_redirect = TRUE;
+ frame_clock = _gdk_frame_clock_idle_new ();
+ gdk_surface_set_frame_clock (surface, frame_clock);
+ g_object_unref (frame_clock);
+
G_OBJECT_CLASS (gdk_x11_drag_surface_parent_class)->constructed (object);
}