diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 91ee76f34..1a5948401 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -48,6 +48,7 @@
#include "display-private.h"
#include "window-private.h"
#include "meta-window-wayland.h"
+#include "bell.h"
#include "compositor/region-utils.h"
@@ -2057,9 +2058,33 @@ gtk_shell_set_startup_id (struct wl_client *client,
startup_id);
}
+static void
+gtk_shell_system_bell (struct wl_client *client,
+ struct wl_resource *resource,
+ struct wl_resource *gtk_surface_resource)
+{
+ MetaDisplay *display = meta_get_display ();
+
+ if (gtk_surface_resource)
+ {
+ MetaWaylandSurface *surface =
+ wl_resource_get_user_data (gtk_surface_resource);
+
+ if (!surface->window)
+ return;
+
+ meta_bell_notify (display, surface->window);
+ }
+ else
+ {
+ meta_bell_notify (display, NULL);
+ }
+}
+
static const struct gtk_shell1_interface meta_wayland_gtk_shell_interface = {
gtk_shell_get_gtk_surface,
gtk_shell_set_startup_id,
+ gtk_shell_system_bell,
};
static void
diff --git a/src/wayland/protocol/gtk-shell.xml b/src/wayland/protocol/gtk-shell.xml
index 1dc06a0a9..aa9993d66 100644
--- a/src/wayland/protocol/gtk-shell.xml
+++ b/src/wayland/protocol/gtk-shell.xml
@@ -24,6 +24,10 @@
+
+
+
+