csi: implement CSI Ps ; Ps ; Ps t reporting escape sequences

A lot of the escape sequences on the "CSI Ps ; Ps ; Ps t" form are
expected to return a reply. Thus, not having these implemented means
we will hang if the client sends these escapes.

Not all of these escapes can be meaningfully implemented on Wayland,
and thus this implementation is best effort.

We now support the following escapes:

* 11t   - report if window is iconified (always replies "no")
* 13t   - report window position (always replies 0,0)
* 13;2t - report text area position (replies with margins, since we
          cannot get the window's position)
* 14t   - report text area size, in pixels
* 14;2t - report window size, in pixels
* 15t   - report screen size, in pixels
* 16t   - report cell size, in pixels
* 18t   - report text area size, in cells
* 19t   - report screen size, in cells
This commit is contained in:
Daniel Eklöf 2020-04-17 23:03:20 +02:00
parent 842cd158d2
commit fa8b0cbd80
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 97 additions and 12 deletions

View file

@ -626,7 +626,7 @@ grid_render_scroll_reverse(struct terminal *term, struct buffer *buf,
int height = (dmg->scroll.region.end - dmg->scroll.region.start - dmg->scroll.lines) * term->cell_height;
LOG_DBG(
"damage: SCROLL REVERSE: %d-%d by %d lines"m
"damage: SCROLL REVERSE: %d-%d by %d lines",
dmg->scroll.region.start, dmg->scroll.region.end, dmg->scroll.lines);
if (height <= 0)