From 839c84129057e501cd558bd419f2cd1825419bb6 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 6 Jul 2026 14:07:49 -0300 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tty.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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); -- cgit v1.3