Rename wlr_surface->signals to events
This commit is contained in:
parent
74d31983b5
commit
7b6d785f52
|
@ -71,7 +71,7 @@ struct wlr_surface {
|
||||||
struct {
|
struct {
|
||||||
struct wl_signal commit;
|
struct wl_signal commit;
|
||||||
struct wl_signal destroy;
|
struct wl_signal destroy;
|
||||||
} signals;
|
} events;
|
||||||
|
|
||||||
// destroy listener used by compositor
|
// destroy listener used by compositor
|
||||||
struct wl_listener compositor_listener;
|
struct wl_listener compositor_listener;
|
||||||
|
|
|
@ -102,7 +102,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
|
||||||
wl_list_init(&roots_surface->request_set_maximized.link);
|
wl_list_init(&roots_surface->request_set_maximized.link);
|
||||||
wl_list_init(&roots_surface->surface_commit.link);
|
wl_list_init(&roots_surface->surface_commit.link);
|
||||||
roots_surface->surface_commit.notify = handle_surface_commit;
|
roots_surface->surface_commit.notify = handle_surface_commit;
|
||||||
wl_signal_add(&surface->surface->signals.commit,
|
wl_signal_add(&surface->surface->events.commit,
|
||||||
&roots_surface->surface_commit);
|
&roots_surface->surface_commit);
|
||||||
|
|
||||||
struct roots_view *view = calloc(1, sizeof(struct roots_view));
|
struct roots_view *view = calloc(1, sizeof(struct roots_view));
|
||||||
|
|
|
@ -417,7 +417,7 @@ void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
|
||||||
wl_list_remove(&wlr_seat->pointer_state.resource_destroy.link);
|
wl_list_remove(&wlr_seat->pointer_state.resource_destroy.link);
|
||||||
wl_list_init(&wlr_seat->pointer_state.resource_destroy.link);
|
wl_list_init(&wlr_seat->pointer_state.resource_destroy.link);
|
||||||
if (surface) {
|
if (surface) {
|
||||||
wl_signal_add(&surface->signals.destroy,
|
wl_signal_add(&surface->events.destroy,
|
||||||
&wlr_seat->pointer_state.surface_destroy);
|
&wlr_seat->pointer_state.surface_destroy);
|
||||||
wl_resource_add_destroy_listener(surface->resource,
|
wl_resource_add_destroy_listener(surface->resource,
|
||||||
&wlr_seat->pointer_state.resource_destroy);
|
&wlr_seat->pointer_state.resource_destroy);
|
||||||
|
@ -733,7 +733,7 @@ void wlr_seat_keyboard_enter(struct wlr_seat *wlr_seat,
|
||||||
wl_list_remove(&wlr_seat->keyboard_state.resource_destroy.link);
|
wl_list_remove(&wlr_seat->keyboard_state.resource_destroy.link);
|
||||||
wl_list_init(&wlr_seat->keyboard_state.resource_destroy.link);
|
wl_list_init(&wlr_seat->keyboard_state.resource_destroy.link);
|
||||||
if (surface) {
|
if (surface) {
|
||||||
wl_signal_add(&surface->signals.destroy,
|
wl_signal_add(&surface->events.destroy,
|
||||||
&wlr_seat->keyboard_state.surface_destroy);
|
&wlr_seat->keyboard_state.surface_destroy);
|
||||||
wl_resource_add_destroy_listener(surface->resource,
|
wl_resource_add_destroy_listener(surface->resource,
|
||||||
&wlr_seat->keyboard_state.resource_destroy);
|
&wlr_seat->keyboard_state.resource_destroy);
|
||||||
|
|
|
@ -360,7 +360,7 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
|
||||||
oldh != surface->current->buffer_height;
|
oldh != surface->current->buffer_height;
|
||||||
|
|
||||||
// TODO: add the invalid bitfield to this callback
|
// TODO: add the invalid bitfield to this callback
|
||||||
wl_signal_emit(&surface->signals.commit, surface);
|
wl_signal_emit(&surface->events.commit, surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool wlr_subsurface_is_synchronized(struct wlr_subsurface *subsurface) {
|
static bool wlr_subsurface_is_synchronized(struct wlr_subsurface *subsurface) {
|
||||||
|
@ -583,7 +583,7 @@ void wlr_subsurface_destroy(struct wlr_subsurface *subsurface) {
|
||||||
|
|
||||||
static void destroy_surface(struct wl_resource *resource) {
|
static void destroy_surface(struct wl_resource *resource) {
|
||||||
struct wlr_surface *surface = wl_resource_get_user_data(resource);
|
struct wlr_surface *surface = wl_resource_get_user_data(resource);
|
||||||
wl_signal_emit(&surface->signals.destroy, surface);
|
wl_signal_emit(&surface->events.destroy, surface);
|
||||||
|
|
||||||
if (surface->subsurface) {
|
if (surface->subsurface) {
|
||||||
wlr_subsurface_destroy(surface->subsurface);
|
wlr_subsurface_destroy(surface->subsurface);
|
||||||
|
@ -611,8 +611,8 @@ struct wlr_surface *wlr_surface_create(struct wl_resource *res,
|
||||||
surface->current = wlr_surface_state_create();
|
surface->current = wlr_surface_state_create();
|
||||||
surface->pending = wlr_surface_state_create();
|
surface->pending = wlr_surface_state_create();
|
||||||
|
|
||||||
wl_signal_init(&surface->signals.commit);
|
wl_signal_init(&surface->events.commit);
|
||||||
wl_signal_init(&surface->signals.destroy);
|
wl_signal_init(&surface->events.destroy);
|
||||||
wl_list_init(&surface->subsurface_list);
|
wl_list_init(&surface->subsurface_list);
|
||||||
wl_list_init(&surface->subsurface_pending_list);
|
wl_list_init(&surface->subsurface_pending_list);
|
||||||
wl_resource_set_implementation(res, &surface_interface,
|
wl_resource_set_implementation(res, &surface_interface,
|
||||||
|
@ -803,7 +803,7 @@ void wlr_surface_make_subsurface(struct wlr_surface *surface,
|
||||||
|
|
||||||
// link parent
|
// link parent
|
||||||
subsurface->parent = parent;
|
subsurface->parent = parent;
|
||||||
wl_signal_add(&parent->signals.destroy,
|
wl_signal_add(&parent->events.destroy,
|
||||||
&subsurface->parent_destroy_listener);
|
&subsurface->parent_destroy_listener);
|
||||||
subsurface->parent_destroy_listener.notify =
|
subsurface->parent_destroy_listener.notify =
|
||||||
subsurface_handle_parent_destroy;
|
subsurface_handle_parent_destroy;
|
||||||
|
|
|
@ -334,7 +334,7 @@ static void wl_shell_get_shell_surface(struct wl_client *client,
|
||||||
wl_signal_init(&wl_surface->events.set_title);
|
wl_signal_init(&wl_surface->events.set_title);
|
||||||
wl_signal_init(&wl_surface->events.set_class);
|
wl_signal_init(&wl_surface->events.set_class);
|
||||||
|
|
||||||
wl_signal_add(&wl_surface->surface->signals.destroy,
|
wl_signal_add(&wl_surface->surface->events.destroy,
|
||||||
&wl_surface->surface_destroy_listener);
|
&wl_surface->surface_destroy_listener);
|
||||||
wl_surface->surface_destroy_listener.notify = handle_wlr_surface_destroyed;
|
wl_surface->surface_destroy_listener.notify = handle_wlr_surface_destroyed;
|
||||||
|
|
||||||
|
|
|
@ -1109,11 +1109,11 @@ static void xdg_shell_get_xdg_surface(struct wl_client *wl_client,
|
||||||
wl_signal_init(&surface->events.ack_configure);
|
wl_signal_init(&surface->events.ack_configure);
|
||||||
wl_signal_init(&surface->events.ping_timeout);
|
wl_signal_init(&surface->events.ping_timeout);
|
||||||
|
|
||||||
wl_signal_add(&surface->surface->signals.destroy,
|
wl_signal_add(&surface->surface->events.destroy,
|
||||||
&surface->surface_destroy_listener);
|
&surface->surface_destroy_listener);
|
||||||
surface->surface_destroy_listener.notify = handle_wlr_surface_destroyed;
|
surface->surface_destroy_listener.notify = handle_wlr_surface_destroyed;
|
||||||
|
|
||||||
wl_signal_add(&surface->surface->signals.commit,
|
wl_signal_add(&surface->surface->events.commit,
|
||||||
&surface->surface_commit_listener);
|
&surface->surface_commit_listener);
|
||||||
surface->surface_commit_listener.notify = handle_wlr_surface_committed;
|
surface->surface_commit_listener.notify = handle_wlr_surface_committed;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue