mirror of
https://github.com/vidarh/ruby-x11
synced 2025-01-13 20:01:22 +01:00
add opcode field to packets
X11 requests must contain an opcode field to be sent so the X11 server can identify the request
This commit is contained in:
parent
23fa93fa24
commit
1dafc7ee61
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,7 @@ module X11
|
|||
end
|
||||
end
|
||||
|
||||
packet.join
|
||||
((@opcode ? [X11::Type::Int8.pack(@opcode)] : []) + packet).join
|
||||
end
|
||||
|
||||
def read(socket)
|
||||
|
@ -73,6 +73,10 @@ module X11
|
|||
@structs << s
|
||||
end
|
||||
|
||||
def opcode(value)
|
||||
@opcode = value
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def lengths_for(args)
|
||||
|
|
Loading…
Reference in a new issue