Also report the payload for graphics commands

This commit is contained in:
Kovid Goyal 2017-09-26 11:22:14 +05:30
parent 56c2e0c26a
commit 15e03f74f4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 3 deletions

View File

@ -667,11 +667,12 @@ parse_graphics_code(Screen *screen, PyObject UNUSED *dump_callback) {
#define A(x) #x, g.x #define A(x) #x, g.x
#define U(x) #x, (unsigned int)(g.x) #define U(x) #x, (unsigned int)(g.x)
#define I(x) #x, (int)(g.x) #define I(x) #x, (int)(g.x)
REPORT_VA_COMMAND("s {sc sc sI sI sI sI sI sI sI sI sI sI sI sI si}", "graphics_command", REPORT_VA_COMMAND("s {sc sc sI sI sI sI sI sI sI sI sI sI sI sI si} y#", "graphics_command",
A(action), A(transmission_type), A(action), A(transmission_type),
U(format), U(more), U(id), U(format), U(more), U(id),
U(width), U(height), U(x_offset), U(y_offset), U(data_height), U(data_width), U(num_cells), U(num_lines), U(width), U(height), U(x_offset), U(y_offset), U(data_height), U(data_width), U(num_cells), U(num_lines),
U(payload_sz), I(z_index) U(payload_sz), I(z_index),
payload, g.payload_sz
); );
#undef U #undef U
#undef A #undef A

View File

@ -208,7 +208,7 @@ class TestParser(BaseTest):
k.setdefault(f, 0) k.setdefault(f, 0)
p = k.pop('payload', '').encode('utf-8') p = k.pop('payload', '').encode('utf-8')
k['payload_sz'] = len(p) k['payload_sz'] = len(p)
return ('graphics_command', k) return ('graphics_command', k, p)
def t(cmd, **kw): def t(cmd, **kw):
pb('\033_G{};{}\033\\'.format(cmd, enc(kw.get('payload', ''))), c(**kw)) pb('\033_G{};{}\033\\'.format(cmd, enc(kw.get('payload', ''))), c(**kw))