summaryrefslogtreecommitdiff
path: root/src/platform/wayland/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/wayland/shell.c')
-rw-r--r--src/platform/wayland/shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/platform/wayland/shell.c b/src/platform/wayland/shell.c
index a12bd4d..8795989 100644
--- a/src/platform/wayland/shell.c
+++ b/src/platform/wayland/shell.c
@@ -214,6 +214,8 @@ static void registry_global(void *data, struct wl_registry *registry,
} else if (strcmp(interface, zwp_pointer_constraints_v1_interface.name) == 0) {
c->pointer_constraints = wl_registry_bind(registry, name,
&zwp_pointer_constraints_v1_interface, 1);
+ } else if (strcmp(interface, xdg_system_bell_v1_interface.name) == 0) {
+ c->system_bell = wl_registry_bind(registry, name, &xdg_system_bell_v1_interface, 1);
} else if (strcmp(interface, wp_fractional_scale_manager_v1_interface.name) == 0) {
c->scale_mgr = wl_registry_bind(registry, name,
&wp_fractional_scale_manager_v1_interface, 1);
@@ -403,3 +405,10 @@ int surface_init_shell(struct wayland_surface *w, const char *title)
}
return 0;
}
+
+bool wayland_surface_bell(struct wayland_surface *w)
+{
+ if (!w || w->closed || !w->conn || !w->conn->system_bell || !w->surface) return false;
+ xdg_system_bell_v1_ring(w->conn->system_bell, w->surface);
+ return true;
+}