mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-17 13:02:42 +00:00
terminal/mouse: convert Event and Format to lib.Enum
Convert the Event and Format enums from fixed-size Zig enums to lib.Enum so they are C ABI compatible when targeting C. The motion method on Event becomes a free function eventIsMotion since lib.Enum types cannot have declarations.
This commit is contained in:
@@ -93,7 +93,7 @@ pub fn encode(
|
||||
// If we don't have a motion-tracking event mode, do nothing,
|
||||
// because events outside the viewport are never reported in
|
||||
// such cases.
|
||||
if (!opts.event.motion()) return;
|
||||
if (!terminal.mouse.eventSendsMotion(opts.event)) return;
|
||||
|
||||
// For motion modes, we only report if a button is currently pressed.
|
||||
// This lets a TUI detect a click over the surface + drag out
|
||||
|
||||
Reference in New Issue
Block a user