Skip to content

Commit

Permalink
Fix encoding of X11GetKeyboardMappingRequest
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Zhao <[email protected]>
  • Loading branch information
GZGavinZhao authored and robert-ancell committed May 24, 2024
1 parent aa050af commit cc5cf90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/x11_requests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc5cf90

Please sign in to comment.