From cc5cf9051fb7ad327f92ef2ce4eace1cd806f6ab Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Thu, 23 May 2024 20:45:54 -0400 Subject: [PATCH] Fix encoding of X11GetKeyboardMappingRequest Signed-off-by: Gavin Zhao --- lib/src/x11_requests.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/x11_requests.dart b/lib/src/x11_requests.dart index 101c71c..6785f4c 100644 --- a/lib/src/x11_requests.dart +++ b/lib/src/x11_requests.dart @@ -6065,16 +6065,18 @@ class X11GetKeyboardMappingRequest extends X11Request { factory X11GetKeyboardMappingRequest.fromBuffer(X11ReadBuffer buffer) { buffer.skip(1); - var firstKeycode = buffer.readUint32(); + var firstKeycode = buffer.readUint8(); var count = buffer.readUint8(); + buffer.skip(2); return X11GetKeyboardMappingRequest(firstKeycode, count); } @override void encode(X11WriteBuffer buffer) { buffer.skip(1); - buffer.writeUint32(firstKeycode); + buffer.writeUint8(firstKeycode); buffer.writeUint8(count); + buffer.skip(2); } @override