diff options
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwayland.c | 12 | ||||
-rw-r--r-- | xwayland/xwm.c | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index a28073d8..9c0b1839 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -107,8 +107,7 @@ static bool wlr_xwayland_init(struct wlr_xwayland *wlr_xwayland, static void wlr_xwayland_finish(struct wlr_xwayland *wlr_xwayland); static void xwayland_destroy_event(struct wl_listener *listener, void *data) { - struct wl_client *client = data; - struct wlr_xwayland *wlr_xwayland = wl_container_of(client, wlr_xwayland, client); + struct wlr_xwayland *wlr_xwayland = wl_container_of(listener, wlr_xwayland, destroy_listener); /* don't call client destroy */ wlr_xwayland->client = NULL; @@ -120,13 +119,9 @@ static void xwayland_destroy_event(struct wl_listener *listener, void *data) { } } -static struct wl_listener xwayland_destroy_listener = { - .notify = xwayland_destroy_event, -}; - static void wlr_xwayland_finish(struct wlr_xwayland *wlr_xwayland) { if (wlr_xwayland->client) { - wl_list_remove(&xwayland_destroy_listener.link); + wl_list_remove(&wlr_xwayland->destroy_listener.link); wl_client_destroy(wlr_xwayland->client); } @@ -224,7 +219,8 @@ static bool wlr_xwayland_init(struct wlr_xwayland *wlr_xwayland, return false; } - wl_client_add_destroy_listener(wlr_xwayland->client, &xwayland_destroy_listener); + wlr_xwayland->destroy_listener.notify = xwayland_destroy_event; + wl_client_add_destroy_listener(wlr_xwayland->client, &wlr_xwayland->destroy_listener); struct wl_event_loop *loop = wl_display_get_event_loop(wl_display); wlr_xwayland->sigusr1_source = wl_event_loop_add_signal(loop, SIGUSR1, xserver_handle_ready, wlr_xwayland); diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 02794e72..0e161330 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -240,7 +240,7 @@ static void create_surface_handler(struct wl_listener *listener, void *data) { } static void xcb_get_resources(struct wlr_xwm *xwm) { - int i; + size_t i; xcb_intern_atom_cookie_t cookies[ATOM_LAST]; for (i = 0; i < ATOM_LAST; i++) { |