fix: bump xcb-util-cursor to 0.3.5

xcb-util-cursor made another patch release to revert back to Rust 2021
edition, so we bump to that.

Also create a function, `timespec_from_millis` to make creating
`Timespec` for using in `poll` calls a lot more ergonomic.
This commit is contained in:
En-En 2025-10-08 12:27:28 +00:00 committed by Supreeeme
parent e827c42d2d
commit bf745144ac
6 changed files with 41 additions and 59 deletions

View file

@ -7,11 +7,11 @@ mod tests;
use self::event::*;
use crate::xstate::{Decorations, MoveResizeDirection, WindowDims, WmHints, WmName, WmNormalHints};
use crate::{X11Selection, XConnection};
use crate::{timespec_from_millis, X11Selection, XConnection};
use clientside::MyWorld;
use hecs::{Entity, World};
use log::{debug, warn};
use rustix::event::{poll, PollFd, PollFlags, Timespec};
use rustix::event::{poll, PollFd, PollFlags};
use smithay_client_toolkit::activation::ActivationState;
use std::collections::{HashMap, HashSet};
use std::ops::{Deref, DerefMut};
@ -569,11 +569,8 @@ impl<C: XConnection> ServerState<C> {
if let Some(r) = self.queue.prepare_read() {
let fd = r.connection_fd();
let pollfd = PollFd::new(&fd, PollFlags::IN);
let timeout = Some(&Timespec {
tv_sec: 0,
tv_nsec: 0,
});
if poll(&mut [pollfd], timeout).unwrap() > 0 {
let timeout = timespec_from_millis(0);
if poll(&mut [pollfd], Some(&timeout)).unwrap() > 0 {
let _ = r.read();
}
}