diff options
-rw-r--r-- | gdk/gdksurface.c | 16 | ||||
-rw-r--r-- | gdk/wayland/gdksurface-wayland.c | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 651896b34b..ee337c8a2e 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -79,6 +79,7 @@ enum { PROP_0, PROP_CURSOR, PROP_DISPLAY, + PROP_PARENT, PROP_FRAME_CLOCK, PROP_STATE, PROP_MAPPED, @@ -437,6 +438,13 @@ gdk_surface_class_init (GdkSurfaceClass *klass) GDK_TYPE_DISPLAY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + properties[PROP_PARENT] = + g_param_spec_object ("parent", + P_("Parent"), + P_("Parent surface"), + GDK_TYPE_SURFACE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + properties[PROP_FRAME_CLOCK] = g_param_spec_object ("frame-clock", P_("Frame Clock"), @@ -639,6 +647,10 @@ gdk_surface_set_property (GObject *object, g_assert (surface->display != NULL); break; + case PROP_PARENT: + surface->parent = g_value_dup_object (value); + break; + case PROP_FRAME_CLOCK: gdk_surface_set_frame_clock (surface, GDK_FRAME_CLOCK (g_value_get_object (value))); break; @@ -671,6 +683,10 @@ gdk_surface_get_property (GObject *object, g_value_set_object (value, surface->display); break; + case PROP_PARENT: + g_value_set_object (value, surface->parent); + break; + case PROP_FRAME_CLOCK: g_value_set_object (value, surface->frame_clock); break; diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index beea0dcdcd..b3dafbaf4f 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -517,6 +517,7 @@ _gdk_wayland_display_create_surface (GdkDisplay *display, surface = g_object_new (GDK_TYPE_WAYLAND_SURFACE, "display", display, + "parent", parent, "frame-clock", frame_clock, NULL); @@ -534,7 +535,6 @@ _gdk_wayland_display_create_surface (GdkDisplay *display, } surface->surface_type = surface_type; - surface->parent = parent; surface->x = x; surface->y = y; surface->width = width; |