feat: send huge Wayland-to-X selections via INCR
Since the connection handshake establishes the most data a request can send, if the data length exceeds that limit, we can follow ICCCM 2.7.2 sending the INCR property and continuing to send data via PropertyNotify events. To test the changes, we create `XState::set_max_req_bytes` to forcefully trigger the INCR mechanism in integration test runs with a constant, substantially less amount of data.
This commit is contained in:
parent
334933b212
commit
1ec45141e6
4 changed files with 254 additions and 81 deletions
|
|
@ -45,6 +45,9 @@ pub trait RunData {
|
|||
None
|
||||
}
|
||||
fn xwayland_ready(&self, _display: String, _pid: u32) {}
|
||||
fn max_req_len_bytes(&self) -> Option<usize> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn timespec_from_millis(millis: u64) -> Timespec {
|
||||
|
|
@ -186,6 +189,10 @@ pub fn main(mut data: impl RunData) -> Option<()> {
|
|||
}
|
||||
|
||||
let mut xstate = XState::new(xsock_wl.as_fd());
|
||||
if let Some(bytes) = data.max_req_len_bytes() {
|
||||
xstate.set_max_req_bytes(bytes);
|
||||
}
|
||||
|
||||
let mut reader = BufReader::new(&ready_rx);
|
||||
{
|
||||
let mut display = String::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue