summaryrefslogtreecommitdiff
path: root/gdk/gdksurface.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2020-11-24 18:33:05 +0100
committerJonas Ådahl <jadahl@gmail.com>2020-12-07 09:46:39 +0100
commit0c8d97e3f7b73f02b0376d1a7723ef7aba732efb (patch)
tree9562b6f1783312ed508c94bdfbe3d2123e8a1c5c /gdk/gdksurface.c
parent8d4f8f0cfcb79c668400d85834a6bbb0bdf6b2ac (diff)
downloadgtk+-0c8d97e3f7b73f02b0376d1a7723ef7aba732efb.tar.gz
gtk/root: Validate css node after update
It should happen before layout, but after the animation tick, thus after the update.
Diffstat (limited to 'gdk/gdksurface.c')
-rw-r--r--gdk/gdksurface.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 0d36a58a03..6cd7686bb2 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -78,6 +78,7 @@
enum {
POPUP_LAYOUT_CHANGED,
SIZE_CHANGED,
+ LAYOUT,
RENDER,
EVENT,
ENTER_MONITOR,
@@ -572,6 +573,31 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
G_TYPE_INT);
/**
+ * GdkSurface::layout:
+ * @surface: the #GdkSurface
+ * @width: the current width
+ * @height: the current height
+ *
+ * Emitted when the size of @surface is changed, or when relayout should
+ * be performed.
+ *
+ * Surface size is reported in ”application pixels”, not
+ * ”device pixels” (see gdk_surface_get_scale_factor()).
+ */
+ signals[LAYOUT] =
+ g_signal_new (g_intern_static_string ("layout"),
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 2,
+ G_TYPE_INT,
+ G_TYPE_INT);
+
+ /**
* GdkSurface::render:
* @surface: the #GdkSurface
* @region: the region that needs to be redrawn