deps: bump rustix to version 1

This commit is contained in:
En-En 2025-10-03 20:57:28 +00:00 committed by Supreeeme
parent a9188e70bd
commit e827c42d2d
6 changed files with 122 additions and 93 deletions

View file

@ -2,7 +2,7 @@ use super::{selection::Clipboard, InnerServerState, NoConnection, ServerState, W
use crate::server::selection::{Primary, SelectionType};
use crate::xstate::{SetState, WinSize, WmName};
use crate::XConnection;
use rustix::event::{poll, PollFd, PollFlags};
use rustix::event::{poll, PollFd, PollFlags, Timespec};
use std::collections::HashMap;
use std::io::Write;
use std::os::fd::{AsRawFd, BorrowedFd};
@ -361,7 +361,11 @@ impl EarlyTestFixture {
// Handle initial globals roundtrip setup requirement
let thread = std::thread::spawn(move || {
let mut pollfd = [PollFd::from_borrowed_fd(testwl.poll_fd(), PollFlags::IN)];
if poll(&mut pollfd, 1000).unwrap() == 0 {
let timeout = Some(&Timespec {
tv_sec: 1,
tv_nsec: 0,
});
if poll(&mut pollfd, timeout).unwrap() == 0 {
panic!("Did not get events for testwl!");
}
testwl.dispatch();
@ -1392,11 +1396,15 @@ fn copy_from_wayland<T: SelectionTest>() {
s.spawn(|| {
let pollfd = unsafe { BorrowedFd::borrow_raw(f.testwl.poll_fd().as_raw_fd()) };
let mut pollfd = [PollFd::from_borrowed_fd(pollfd, PollFlags::IN)];
if poll(&mut pollfd, 100).unwrap() == 0 {
let timeout = Some(&Timespec {
tv_sec: 0,
tv_nsec: 100_000_000,
});
if poll(&mut pollfd, timeout).unwrap() == 0 {
panic!("Did not get events for testwl!");
}
f.testwl.dispatch();
while poll(&mut pollfd, 100).unwrap() > 0 {
while poll(&mut pollfd, timeout).unwrap() > 0 {
f.testwl.dispatch();
}
});
@ -1452,11 +1460,15 @@ fn selection_x11_then_wayland<T: SelectionTest>() {
s.spawn(|| {
let pollfd = unsafe { BorrowedFd::borrow_raw(f.testwl.poll_fd().as_raw_fd()) };
let mut pollfd = [PollFd::from_borrowed_fd(pollfd, PollFlags::IN)];
if poll(&mut pollfd, 100).unwrap() == 0 {
let timeout = Some(&Timespec {
tv_sec: 0,
tv_nsec: 100_000_000,
});
if poll(&mut pollfd, timeout).unwrap() == 0 {
panic!("Did not get events for testwl!");
}
f.testwl.dispatch();
while poll(&mut pollfd, 100).unwrap() > 0 {
while poll(&mut pollfd, timeout).unwrap() > 0 {
f.testwl.dispatch();
}
});