test/wayland/client-utils: Add 'painted' signal
This is emitted when a client painted and committed new surface content. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3475>
This commit is contained in:
parent
2d18b976c1
commit
4d8f6af487
1 changed files with 13 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SYNC_EVENT,
|
SYNC_EVENT,
|
||||||
|
SURFACE_PAINTED,
|
||||||
N_SIGNALS
|
N_SIGNALS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -453,6 +454,16 @@ wayland_display_class_init (WaylandDisplayClass *klass)
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
G_TYPE_UINT);
|
G_TYPE_UINT);
|
||||||
|
|
||||||
|
signals[SURFACE_PAINTED] =
|
||||||
|
g_signal_new ("surface-painted",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
0,
|
||||||
|
NULL, NULL, NULL,
|
||||||
|
G_TYPE_NONE,
|
||||||
|
1,
|
||||||
|
WAYLAND_TYPE_SURFACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -529,6 +540,8 @@ handle_xdg_surface_configure (void *data,
|
||||||
|
|
||||||
xdg_surface_ack_configure (xdg_surface, serial);
|
xdg_surface_ack_configure (xdg_surface, serial);
|
||||||
wl_surface_commit (surface->wl_surface);
|
wl_surface_commit (surface->wl_surface);
|
||||||
|
|
||||||
|
g_signal_emit (surface->display, signals[SURFACE_PAINTED], 0, surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct xdg_surface_listener xdg_surface_listener = {
|
static const struct xdg_surface_listener xdg_surface_listener = {
|
||||||
|
|
Loading…
Reference in a new issue