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:
parent
e827c42d2d
commit
bf745144ac
6 changed files with 41 additions and 59 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -4,7 +4,7 @@ pub mod xstate;
|
|||
use crate::server::{NoConnection, PendingSurfaceState, ServerState};
|
||||
use crate::xstate::{RealConnection, XState};
|
||||
use log::{error, info};
|
||||
use rustix::event::{poll, PollFd, PollFlags};
|
||||
use rustix::event::{poll, PollFd, PollFlags, Timespec};
|
||||
use server::selection::{Clipboard, Primary};
|
||||
use smithay_client_toolkit::data_device_manager::WritePipe;
|
||||
use std::io::{BufRead, BufReader, Read, Write};
|
||||
|
|
@ -47,6 +47,14 @@ pub trait RunData {
|
|||
fn xwayland_ready(&self, _display: String, _pid: u32) {}
|
||||
}
|
||||
|
||||
pub const fn timespec_from_millis(millis: u64) -> Timespec {
|
||||
let d = std::time::Duration::from_millis(millis);
|
||||
Timespec {
|
||||
tv_sec: d.as_secs() as i64,
|
||||
tv_nsec: d.subsec_nanos() as i64,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main(mut data: impl RunData) -> Option<()> {
|
||||
let mut version = env!("VERGEN_GIT_DESCRIBE");
|
||||
if version == "VERGEN_IDEMPOTENT_OUTPUT" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue