mouse button callbacks returns bool for consumption

This commit is contained in:
Mitchell Hashimoto
2024-06-30 09:40:06 -07:00
parent 38c31e98f1
commit 03f37087a5
5 changed files with 52 additions and 18 deletions

View File

@@ -710,10 +710,10 @@ pub const Surface = struct {
action: input.MouseButtonState,
button: input.MouseButton,
mods: input.Mods,
) void {
self.core_surface.mouseButtonCallback(action, button, mods) catch |err| {
) bool {
return self.core_surface.mouseButtonCallback(action, button, mods) catch |err| {
log.err("error in mouse button callback err={}", .{err});
return;
return false;
};
}
@@ -1638,8 +1638,8 @@ pub const CAPI = struct {
action: input.MouseButtonState,
button: input.MouseButton,
mods: c_int,
) void {
surface.mouseButtonCallback(
) bool {
return surface.mouseButtonCallback(
action,
button,
@bitCast(@as(