From 94310c52813e87925171a07391928b7a3d16f038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 25 Jan 2024 01:11:30 +0100 Subject: [PATCH] Wayland: Move listener to correct section --- src/wl_window.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index c7bada57..981f2401 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1980,6 +1980,25 @@ const struct wl_data_device_listener dataDeviceListener = dataDeviceHandleSelection, }; +static void xdgActivationHandleDone(void* userData, + struct xdg_activation_token_v1* activationToken, + const char* token) +{ + _GLFWwindow* window = userData; + + if (activationToken != window->wl.activationToken) + return; + + xdg_activation_v1_activate(_glfw.wl.activationManager, token, window->wl.surface); + xdg_activation_token_v1_destroy(window->wl.activationToken); + window->wl.activationToken = NULL; +} + +static const struct xdg_activation_token_v1_listener xdgActivationListener = +{ + xdgActivationHandleDone +}; + void _glfwAddSeatListenerWayland(struct wl_seat* seat) { wl_seat_add_listener(seat, &seatListener, NULL); @@ -2339,25 +2358,6 @@ void _glfwHideWindowWayland(_GLFWwindow* window) } } -static void xdgActivationHandleDone(void* userData, - struct xdg_activation_token_v1* activationToken, - const char* token) -{ - _GLFWwindow* window = userData; - - if (activationToken != window->wl.activationToken) - return; - - xdg_activation_v1_activate(_glfw.wl.activationManager, token, window->wl.surface); - xdg_activation_token_v1_destroy(window->wl.activationToken); - window->wl.activationToken = NULL; -} - -static const struct xdg_activation_token_v1_listener xdgActivationListener = -{ - xdgActivationHandleDone -}; - void _glfwRequestWindowAttentionWayland(_GLFWwindow* window) { if (!_glfw.wl.activationManager)