1
0
Fork 0
forked from wry/wry

wayland: implement tablet-v2

This commit is contained in:
Julian Orth 2024-05-01 00:09:16 +02:00
parent 86e283d255
commit 7ed499eabd
62 changed files with 5174 additions and 318 deletions

View file

@ -0,0 +1,19 @@
use crate::client::Client;
pub struct PendingSerial<'a> {
serial: Option<u32>,
client: &'a Client,
}
impl<'a> PendingSerial<'a> {
pub fn new(client: &'a Client) -> Self {
Self {
serial: None,
client,
}
}
pub fn get(&mut self) -> u32 {
*self.serial.get_or_insert_with(|| self.client.next_serial())
}
}