Skip to content

Commit

Permalink
Merge pull request #174 from dkondor/xdg_wm_ping
Browse files Browse the repository at this point in the history
gtk-wayland: handle xdg_wm_base::ping
  • Loading branch information
wmww authored Feb 5, 2024
2 parents 6814737 + 0792081 commit 5f71546
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/gtk-wayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ static struct zwlr_layer_shell_v1 *layer_shell_global = NULL;

static gboolean has_initialized = FALSE;

static void
xdg_wm_base_handle_ping (void *_data, struct xdg_wm_base *xdg_wm_base, uint32_t serial)
{
(void)_data;

xdg_wm_base_pong (xdg_wm_base, serial);
}

static const struct xdg_wm_base_listener xdg_wm_base_listener = {
.ping = xdg_wm_base_handle_ping,
};

gboolean
gtk_wayland_get_has_initialized (void)
{
Expand Down Expand Up @@ -71,6 +83,7 @@ wl_registry_handle_global (void *_data,
id,
&xdg_wm_base_interface,
MIN((uint32_t)xdg_wm_base_interface.version, version));
xdg_wm_base_add_listener (xdg_wm_base_global, &xdg_wm_base_listener, NULL);
}
}

Expand Down

0 comments on commit 5f71546

Please sign in to comment.