[gtk/wip/matthiasc/popup5: 152/152] surface: Cosmetics
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 152/152] surface: Cosmetics
- Date: Sun, 26 May 2019 05:32:21 +0000 (UTC)
commit d9f3ae02be3b9cf7458b95650fe1b05dad743bc6
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 26 03:55:08 2019 +0000
surface: Cosmetics
Move things where they belong.
gdk/gdksurface.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 5be583d096..43c8a19180 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -657,10 +657,14 @@ gdk_surface_set_property (GObject *object,
case PROP_DISPLAY:
surface->display = g_value_dup_object (value);
g_assert (surface->display != NULL);
+ g_signal_connect (surface->display, "seat-removed",
+ G_CALLBACK (seat_removed_cb), surface);
break;
case PROP_PARENT:
surface->parent = g_value_dup_object (value);
+ if (surface->parent != NULL)
+ surface->parent->children = g_list_prepend (surface->parent->children, surface);
break;
case PROP_FRAME_CLOCK:
@@ -747,21 +751,10 @@ gdk_surface_new (GdkDisplay *display,
int width,
int height)
{
- GdkSurface *surface;
-
- surface = gdk_display_create_surface (display,
- surface_type,
- parent,
- x, y, width, height);
-
- surface->parent = parent;
- if (parent)
- parent->children = g_list_prepend (parent->children, surface);
-
- g_signal_connect (display, "seat-removed",
- G_CALLBACK (seat_removed_cb), surface);
-
- return surface;
+ return gdk_display_create_surface (display,
+ surface_type,
+ parent,
+ x, y, width, height);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]