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
|
|
@ -1,3 +1,7 @@
|
|||
# UNRELEASED
|
||||
|
||||
* On X11, fix the length of the returned buffer when using the wire-transferred buffer.
|
||||
|
||||
# 0.3.0
|
||||
|
||||
* On MacOS, the contents scale is updated when set_buffer() is called, to adapt when the window is on a new screen (#68).
|
||||
|
|
|
|||
|
|
@ -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