1
0
Fork 0
forked from wry/wry

all: track serials as u64 internally

This commit is contained in:
Julian Orth 2024-10-17 15:20:46 +02:00
parent 437c6b0596
commit c987fdb58d
28 changed files with 123 additions and 119 deletions

View file

@ -106,7 +106,6 @@ use {
cell::{Cell, RefCell},
fmt::{Debug, Formatter},
mem,
num::Wrapping,
ops::DerefMut,
rc::{Rc, Weak},
sync::Arc,
@ -169,7 +168,7 @@ pub struct State {
pub run_args: RunArgs,
pub xwayland: XWaylandState,
pub acceptor: CloneCell<Option<Rc<Acceptor>>>,
pub serial: NumCell<Wrapping<u32>>,
pub serial: NumCell<u64>,
pub run_toplevel: Rc<RunToplevel>,
pub config_dir: Option<String>,
pub config_file_id: NumCell<u64>,
@ -755,8 +754,8 @@ impl State {
}
}
pub fn next_serial(&self, client: Option<&Client>) -> u32 {
let serial = self.serial.fetch_add(Wrapping(1)).0;
pub fn next_serial(&self, client: Option<&Client>) -> u64 {
let serial = self.serial.fetch_add(1);
if let Some(client) = client {
'update_range: {
let mut serials = client.serials.borrow_mut();