this repo has no description
13
fork

Configure Feed

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

fix: add support for kitty mouse leave events

This prevents reporting kitty mouse leave events as spurious mouse clicks.

authored by

CJ van den Berg and committed by
Tim Culverhouse
ad957b78 7b64d572

+10
+5
src/Loop.zig
··· 292 292 return self.postEvent(.{ .mouse = vx.translateMouse(mouse) }); 293 293 } 294 294 }, 295 + .mouse_leave => { 296 + if (@hasField(Event, "mouse_leave")) { 297 + return self.postEvent(.mouse_leave); 298 + } 299 + }, 295 300 .focus_in => { 296 301 if (@hasField(Event, "focus_in")) { 297 302 return self.postEvent(.focus_in);
+4
src/Parser.zig
··· 25 25 const shift: u8 = 0b00000100; 26 26 const alt: u8 = 0b00001000; 27 27 const ctrl: u8 = 0b00010000; 28 + const leave: u16 = 0b100000000; 28 29 }; 29 30 30 31 // the state of the parser ··· 678 679 } else { 679 680 return null_event; 680 681 } 682 + 683 + if (button_mask & mouse_bits.leave > 0) 684 + return .{ .event = .mouse_leave, .n = if (xterm) 6 else input.len }; 681 685 682 686 const button: Mouse.Button = @enumFromInt(button_mask & mouse_bits.buttons); 683 687 const motion = button_mask & mouse_bits.motion > 0;
+1
src/event.zig
··· 8 8 key_press: Key, 9 9 key_release: Key, 10 10 mouse: Mouse, 11 + mouse_leave, 11 12 focus_in, 12 13 focus_out, 13 14 paste_start, // bracketed paste start