From e494de740e1b64996e9ceee81ee084768ec3e70a Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Thu, 31 Mar 2022 10:07:22 -0600 Subject: cubepp: Fix wayland regression --- cube/cube.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cube/cube.cpp') diff --git a/cube/cube.cpp b/cube/cube.cpp index 8970a4ee..fdba5578 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -486,7 +486,7 @@ static void seat_handle_capabilities(void *data, wl_seat *seat, uint32_t caps) { Demo &demo = *static_cast(data); if ((caps & WL_SEAT_CAPABILITY_POINTER) && !demo.pointer) { demo.pointer = wl_seat_get_pointer(seat); - wl_pointer_add_listener(demo.pointer, &pointer_listener, demo); + wl_pointer_add_listener(demo.pointer, &pointer_listener, &demo); } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && demo.pointer) { wl_pointer_destroy(demo.pointer); demo.pointer = nullptr; @@ -494,7 +494,7 @@ static void seat_handle_capabilities(void *data, wl_seat *seat, uint32_t caps) { // Subscribe to keyboard events if (caps & WL_SEAT_CAPABILITY_KEYBOARD) { demo.keyboard = wl_seat_get_keyboard(seat); - wl_keyboard_add_listener(demo.keyboard, &keyboard_listener, demo); + wl_keyboard_add_listener(demo.keyboard, &keyboard_listener, &demo); } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD)) { wl_keyboard_destroy(demo.keyboard); demo.keyboard = nullptr; @@ -519,7 +519,7 @@ static void registry_handle_global(void *data, wl_registry *registry, uint32_t i xdg_wm_base_add_listener(demo.wm_base, &wm_base_listener, nullptr); } else if (strcmp(interface, wl_seat_interface.name) == 0) { demo.seat = (wl_seat *)wl_registry_bind(registry, id, &wl_seat_interface, 1); - wl_seat_add_listener(demo.seat, &seat_listener, demo); + wl_seat_add_listener(demo.seat, &seat_listener, &demo); } else if (strcmp(interface, zxdg_decoration_manager_v1_interface.name) == 0) { demo.xdg_decoration_mgr = (zxdg_decoration_manager_v1 *)wl_registry_bind(registry, id, &zxdg_decoration_manager_v1_interface, 1); -- cgit v1.2.3