bugfix: Fix length of returned buffer on x11 when using the wire-transferred buffer
total_len() computes the number of bytes, while the wire Vec holds u32.
This commit is contained in:
parent
53ae12a637
commit
9b44f2eaea
2 changed files with 5 additions and 1 deletions
|
|
@ -486,7 +486,7 @@ impl Buffer {
|
|||
match self {
|
||||
Buffer::Shm(ref mut shm) => shm.alloc_segment(conn, total_len(width, height)),
|
||||
Buffer::Wire(wire) => {
|
||||
wire.resize(total_len(width, height), 0);
|
||||
wire.resize(total_len(width, height) / 4, 0);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue