mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 05:22:00 +00:00
Wayland: Move listener to correct section
This commit is contained in:
parent
bdedec9932
commit
94310c5281
@ -1980,6 +1980,25 @@ const struct wl_data_device_listener dataDeviceListener =
|
|||||||
dataDeviceHandleSelection,
|
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)
|
void _glfwAddSeatListenerWayland(struct wl_seat* seat)
|
||||||
{
|
{
|
||||||
wl_seat_add_listener(seat, &seatListener, NULL);
|
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)
|
void _glfwRequestWindowAttentionWayland(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
if (!_glfw.wl.activationManager)
|
if (!_glfw.wl.activationManager)
|
||||||
|
Loading…
Reference in New Issue
Block a user