swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 5dc48e1022d2d6e3df2361e8ec311ea4d89a1db5
parent d594f9a1528376ca0fcac2f1b8d83397b1d63132
Author: Tony Olagbaiye <me@fron.io>
Date:   Tue,  7 Jul 2020 20:21:40 +0100

Revert "compositor: Remove unused new_surface signal"

Diffstat:
Mlibswc/compositor.c | 3+++
Mlibswc/compositor.h | 9+++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/libswc/compositor.c b/libswc/compositor.c @@ -769,6 +769,8 @@ create_surface(struct wl_client *client, struct wl_resource *resource, uint32_t wl_resource_post_no_memory(resource); return; } + + wl_signal_emit(&swc_compositor.signal.new_surface, surface); } static void @@ -813,6 +815,7 @@ compositor_initialize(void) pixman_region32_init(&compositor.damage); pixman_region32_init(&compositor.opaque); wl_list_init(&compositor.views); + wl_signal_init(&swc_compositor.signal.new_surface); compositor.swc_listener.notify = &handle_swc_event; wl_signal_add(&swc.event_signal, &compositor.swc_listener); diff --git a/libswc/compositor.h b/libswc/compositor.h @@ -32,6 +32,15 @@ struct swc_compositor { struct pointer_handler *const pointer_handler; + struct { + /** + * Emitted when a new surface is created. + * + * The data argument of the signal refers to the surface that has been + * created. + */ + struct wl_signal new_surface; + } signal; }; bool compositor_initialize(void);