mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Wayland: Fix formatting of attention request
This commit is contained in:
parent
9317970243
commit
bdedec9932
@ -2345,7 +2345,7 @@ static void xdgActivationHandleDone(void* userData,
|
|||||||
{
|
{
|
||||||
_GLFWwindow* window = userData;
|
_GLFWwindow* window = userData;
|
||||||
|
|
||||||
if(activationToken != window->wl.activationToken)
|
if (activationToken != window->wl.activationToken)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xdg_activation_v1_activate(_glfw.wl.activationManager, token, window->wl.surface);
|
xdg_activation_v1_activate(_glfw.wl.activationManager, token, window->wl.surface);
|
||||||
@ -2360,15 +2360,18 @@ static const struct xdg_activation_token_v1_listener xdgActivationListener =
|
|||||||
|
|
||||||
void _glfwRequestWindowAttentionWayland(_GLFWwindow* window)
|
void _glfwRequestWindowAttentionWayland(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
if(!_glfw.wl.activationManager)
|
if (!_glfw.wl.activationManager)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//We're about to overwrite this with a new request
|
// We're about to overwrite this with a new request
|
||||||
if(window->wl.activationToken)
|
if (window->wl.activationToken)
|
||||||
xdg_activation_token_v1_destroy(window->wl.activationToken);
|
xdg_activation_token_v1_destroy(window->wl.activationToken);
|
||||||
|
|
||||||
window->wl.activationToken = xdg_activation_v1_get_activation_token(_glfw.wl.activationManager);
|
window->wl.activationToken =
|
||||||
xdg_activation_token_v1_add_listener(window->wl.activationToken, &xdgActivationListener, window);
|
xdg_activation_v1_get_activation_token(_glfw.wl.activationManager);
|
||||||
|
xdg_activation_token_v1_add_listener(window->wl.activationToken,
|
||||||
|
&xdgActivationListener,
|
||||||
|
window);
|
||||||
|
|
||||||
xdg_activation_token_v1_commit(window->wl.activationToken);
|
xdg_activation_token_v1_commit(window->wl.activationToken);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user