summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 17:03:07 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit0cde1a7537cd9f88b2f97f3c51b54669d909b597 (patch)
treeebbf8b12f2c8c5ea90be8be8d714fabcca4d535e /src/pardes.zig
parent257936b5803b5660428f29fdf4bae620f83b4018 (diff)
downloadpardes-0cde1a7537cd9f88b2f97f3c51b54669d909b597.tar.gz
pardes-0cde1a7537cd9f88b2f97f3c51b54669d909b597.zip
A focus moved over 9P tells the programs that asked for focus reports, as a click does
A program that set DECSET 1004 heard `CSI O` and `CSI I` when the keyboard moved by a click, a key or the window's focus, because update() checks after each event. A /focus write went through serveFs, which never did, so the program kept believing it had focus until the next input event. serveFs now runs the same check once a request has settled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 402b3cd8..3a6e154a 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -5733,6 +5733,9 @@ pub const Pardes = struct {
// the end of whatever the editor does next.
p.sync();
p.fsReport();
+ // A /focus write moves the keyboard as a click does: the programs
+ // that asked (DECSET 1004) hear it now, as after update().
+ p.reportFocus();
ctlfs.events.announce(p);
return reply;
}