Wayland: Move listener to correct section

This commit is contained in:
Camilla Löwy 2024-01-25 01:11:30 +01:00
parent bdedec9932
commit 94310c5281

View File

@ -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)