summaryrefslogtreecommitdiff
path: root/src/tty.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-06 14:07:49 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit839c84129057e501cd558bd419f2cd1825419bb6 (patch)
tree9665fd0928c960186d42de651dae01f77152e47e /src/tty.zig
parentde4def3548a6729b0dfd2120495a61beef8c8c2c (diff)
downloadpardes-839c84129057e501cd558bd419f2cd1825419bb6.tar.gz
pardes-839c84129057e501cd558bd419f2cd1825419bb6.zip
ghostty middle-click diagnosis: not a pardes bug — ghostty's GTK apprt swallows middle press+release before mouse reporting when the desktop sets gtk-enable-primary-paste=false (apprt/gtk/class/surface.zig gcMouseDown/gcMouseUp; this machine has it false in gsettings). New snapshot ghostty-mid feeds pardes ghostty's byte-exact SGR middle-click stream (focus-in, per-cell hover motions, press M/release m) and proves the tty path executes it correctly. Comment at the setMouseMode call documents the trap.
Diffstat (limited to 'src/tty.zig')
-rw-r--r--src/tty.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tty.zig b/src/tty.zig
index d9821343..4cb4fa1d 100644
--- a/src/tty.zig
+++ b/src/tty.zig
@@ -44,6 +44,11 @@ pub fn run(init: std.process.Init, opts: pardes.Options) !void {
defer vx.deinit(gpa, tty.writer());
try vx.enterAltScreen(tty.writer());
defer vx.exitAltScreen(tty.writer()) catch {};
+ // requests 1002;1003;1004;1006 (cell-coordinate SGR; called pre-query, so
+ // vaxis never upgrades to 1016 pixel mode). Note: ghostty's GTK apprt drops
+ // middle press+release BEFORE mouse reporting when the desktop sets
+ // gtk-enable-primary-paste=false — no mode we request can surface middle
+ // clicks there (see test/snapshots/ghostty-mid.snap).
try vx.setMouseMode(tty.writer(), true);
var frame_arena: std.heap.ArenaAllocator = .init(gpa);