all: track serials as u64 internally
This commit is contained in:
parent
437c6b0596
commit
c987fdb58d
28 changed files with 123 additions and 119 deletions
|
|
@ -60,11 +60,11 @@ impl ZwpTabletPadGroupV2 {
|
|||
self.client.event(Done { self_id: self.id });
|
||||
}
|
||||
|
||||
pub fn send_mode_switch(&self, time: u32, serial: u32, mode: u32) {
|
||||
pub fn send_mode_switch(&self, time: u32, serial: u64, mode: u32) {
|
||||
self.client.event(ModeSwitch {
|
||||
self_id: self.id,
|
||||
time,
|
||||
serial,
|
||||
serial: serial as _,
|
||||
mode,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,21 +68,21 @@ impl ZwpTabletPadV2 {
|
|||
});
|
||||
}
|
||||
|
||||
pub fn send_enter(&self, serial: u32, tablet: &ZwpTabletV2, surface: &WlSurface) {
|
||||
pub fn send_enter(&self, serial: u64, tablet: &ZwpTabletV2, surface: &WlSurface) {
|
||||
self.entered.set(true);
|
||||
self.client.event(Enter {
|
||||
self_id: self.id,
|
||||
serial,
|
||||
serial: serial as _,
|
||||
tablet: tablet.id,
|
||||
surface: surface.id,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn send_leave(&self, serial: u32, surface: &WlSurface) {
|
||||
pub fn send_leave(&self, serial: u64, surface: &WlSurface) {
|
||||
self.entered.set(false);
|
||||
self.client.event(Leave {
|
||||
self_id: self.id,
|
||||
serial,
|
||||
serial: serial as _,
|
||||
surface: surface.id,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,11 +98,11 @@ impl ZwpTabletToolV2 {
|
|||
self.client.event(Removed { self_id: self.id });
|
||||
}
|
||||
|
||||
pub fn send_proximity_in(&self, serial: u32, tablet: &ZwpTabletV2, surface: &WlSurface) {
|
||||
pub fn send_proximity_in(&self, serial: u64, tablet: &ZwpTabletV2, surface: &WlSurface) {
|
||||
self.entered.set(true);
|
||||
self.client.event(ProximityIn {
|
||||
self_id: self.id,
|
||||
serial,
|
||||
serial: serial as _,
|
||||
tablet: tablet.id,
|
||||
surface: surface.id,
|
||||
});
|
||||
|
|
@ -113,10 +113,10 @@ impl ZwpTabletToolV2 {
|
|||
self.client.event(ProximityOut { self_id: self.id });
|
||||
}
|
||||
|
||||
pub fn send_down(&self, serial: u32) {
|
||||
pub fn send_down(&self, serial: u64) {
|
||||
self.client.event(Down {
|
||||
self_id: self.id,
|
||||
serial,
|
||||
serial: serial as _,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -177,10 +177,10 @@ impl ZwpTabletToolV2 {
|
|||
});
|
||||
}
|
||||
|
||||
pub fn send_button(&self, serial: u32, button: u32, state: ToolButtonState) {
|
||||
pub fn send_button(&self, serial: u64, button: u32, state: ToolButtonState) {
|
||||
self.client.event(Button {
|
||||
self_id: self.id,
|
||||
serial,
|
||||
serial: serial as _,
|
||||
button,
|
||||
state: match state {
|
||||
ToolButtonState::Released => 0,
|
||||
|
|
@ -204,7 +204,7 @@ impl ZwpTabletToolV2RequestHandler for ZwpTabletToolV2 {
|
|||
let Some(tool) = self.tool.get() else {
|
||||
return Ok(());
|
||||
};
|
||||
if !self.seat.client.valid_serial(req.serial) {
|
||||
if self.seat.client.map_serial(req.serial).is_none() {
|
||||
log::warn!("Client tried to set_cursor with an invalid serial");
|
||||
return Ok(());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue