this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

vxfw(SplitView): reset state on mouse_leave

+9 -1
+9 -1
src/vxfw/SplitView.zig
··· 35 35 36 36 fn typeErasedEventHandler(ptr: *anyopaque, ctx: *vxfw.EventContext, event: vxfw.Event) anyerror!void { 37 37 const self: *SplitView = @ptrCast(@alignCast(ptr)); 38 - if (event != .mouse) return; 38 + switch (event) { 39 + .mouse_leave => { 40 + self.pressed = false; 41 + return; 42 + }, 43 + .mouse => {}, 44 + else => return, 45 + } 39 46 const mouse = event.mouse; 40 47 41 48 const separator_col: u16 = switch (self.constrain) { ··· 71 78 if (self.max_width) |max| { 72 79 self.width = @min(self.width, max); 73 80 } 81 + ctx.consume_event = true; 74 82 } 75 83 } 76 84