From 77c6cf4fe6a8b933e932ac58cbc69bde2f233e9b Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Fri, 10 Nov 2023 20:27:40 +0100 Subject: [PATCH] implemented a stub wl_surface_leave This fixes "listener function for opcode 1 of wl_surface is NULL" error in wayfire 0.8.0 Ref: https://github.com/jjsullivan5196/wvkbd/issues/52 --- main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.c b/main.c index 578633d..b1cdfef 100644 --- a/main.c +++ b/main.c @@ -115,6 +115,8 @@ static void seat_handle_name(void *data, struct wl_seat *wl_seat, static void wl_surface_enter(void *data, struct wl_surface *wl_surface, struct wl_output *wl_output); +static void wl_surface_leave(void *data, struct wl_surface *wl_surface, + struct wl_output *wl_output); static void handle_global(void *data, struct wl_registry *registry, uint32_t name, const char *interface, @@ -155,6 +157,7 @@ static const struct wl_seat_listener seat_listener = { static const struct wl_surface_listener surface_listener = { .enter = wl_surface_enter, + .leave = wl_surface_leave, }; static const struct wl_registry_listener registry_listener = { @@ -357,6 +360,12 @@ wl_surface_enter(void *data, struct wl_surface *wl_surface, flip_landscape(); } +void +wl_surface_leave(void *data, struct wl_surface *wl_surface, + struct wl_output *wl_output) { +} + + static void display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y, int physical_width, int physical_height, int subpixel,