From 8658ab4bed1d51e9e4260c7c554b4c769b8d2f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 16 Feb 2021 14:31:46 +0100 Subject: [PATCH] =?UTF-8?q?csi:=20=E2=80=98CSI=2013=20;=202=20t=E2=80=99?= =?UTF-8?q?=20reply=20is=20now=20(0,0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foot previously responded with window local coordinates. But, XTerm responds with screen *absolute* coordinates. This isn’t possible under Wayland, thus we now report (0,0) instead. Same as we do for ‘CSI 13 ; 0 t’. --- CHANGELOG.md | 2 ++ csi.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba20e9e5..ab3524a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,8 @@ before sending the new dimensions to the client application. The timing can be tweaked, or completely disabled, by setting `resize-delay-ms` (https://codeberg.org/dnkl/foot/issues/301). +* `CSI 13 ; 2 t` now reports (0,0). + ### Deprecated ### Removed diff --git a/csi.c b/csi.c index 93d70944..7a50ef5b 100644 --- a/csi.c +++ b/csi.c @@ -1200,10 +1200,10 @@ csi_dispatch(struct terminal *term, uint8_t final) case 13: { /* report window position */ - /* We don't know our position - always report (0,0) */ int x = -1; int y = -1; + /* We don't know our position - always report (0,0) */ switch (vt_param_get(term, 1, 0)) { case 0: /* window position */ @@ -1212,8 +1212,7 @@ csi_dispatch(struct terminal *term, uint8_t final) case 2: /* text area position */ - x = term->margins.left; - y = term->margins.top; + x = y = 0; break; default: