gtk(bell): use gdk.Surface.beep for bell

Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
This commit is contained in:
Leah Amelia Chen
2025-04-14 21:43:02 +08:00
parent a0760cabd6
commit 10a591fba2

View File

@@ -2441,5 +2441,13 @@ pub fn setSecureInput(self: *Surface, value: apprt.action.SecureInput) void {
}
pub fn ringBell(self: *Surface) !void {
const window = self.container.window() orelse {
log.warn("failed to ring bell: surface is not attached to any window", .{});
return;
};
// System beep
if (window.window.as(gtk.Native).getSurface()) |surface| {
surface.beep();
}
}