chore: update smithay

This commit is contained in:
Victoria Brekenfeld 2026-08-19 12:40:05 +02:00 • committed by Victoria Brekenfeld
parent 31827ed240
commit 5c93094574
22 changed files with 168 additions and 165 deletions

View file

@ -12,7 +12,7 @@ use id_tree::NodeId;
use smithay::{
backend::{
drm::DrmNode,
input::KeyState,
input::{InputTime, KeyState},
renderer::{
element::{
Element, Kind, RenderElement, UnderlyingStorage,
@ -1012,7 +1012,7 @@ impl KeyboardTarget<State> for CosmicMapped {
key: KeysymHandle<'_>,
state: KeyState,
serial: Serial,
time: u32,
time: InputTime,
) {
match &self.element {
CosmicMappedInternal::Stack(s) => {

View file

@ -38,7 +38,7 @@ use shortcuts::action::{Direction, FocusDirection};
use smithay::{
backend::{
drm::DrmNode,
input::KeyState,
input::{InputTime, KeyState},
renderer::{
ImportAll, ImportMem, Renderer,
element::{Element, Id as RendererId, Kind, RenderElement, UnderlyingStorage},
@ -1557,7 +1557,7 @@ impl KeyboardTarget<State> for CosmicStack {
key: KeysymHandle<'_>,
state: KeyState,
serial: Serial,
time: u32,
time: InputTime,
) {
let active = self.keyboard_leave_if_previous(seat, data, serial);
self.0.with_program(|p| {
@ -1726,7 +1726,7 @@ impl PointerTarget<State> for CosmicStack {
}
}
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: u32) {
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: InputTime) {
self.0.with_program(|p| {
let mut cursor_state = seat
.user_data()

View file

@ -21,6 +21,7 @@ use std::{
use smithay::{
backend::{
drm::DrmNode,
input::InputTime,
renderer::{
ImportAll, Renderer, buffer_has_alpha,
element::{Kind, RenderElementStates, surface::KindEvaluation},
@ -1084,7 +1085,7 @@ impl KeyboardTarget<State> for CosmicSurface {
key: KeysymHandle<'_>,
state: smithay::backend::input::KeyState,
serial: smithay::utils::Serial,
time: u32,
time: InputTime,
) {
match self.0.underlying_surface() {
WindowSurface::Wayland(toplevel) => {

View file

@ -21,7 +21,7 @@ use cosmic_comp_config::AppearanceConfig;
use smithay::{
backend::{
drm::DrmNode,
input::KeyState,
input::{InputTime, KeyState},
renderer::{
ImportAll, ImportMem, Renderer,
element::{Element, Id as RendererId, Kind, RenderElement, UnderlyingStorage},
@ -985,7 +985,7 @@ impl KeyboardTarget<State> for CosmicWindow {
key: KeysymHandle<'_>,
state: KeyState,
serial: Serial,
time: u32,
time: InputTime,
) {
self.0
.with_program(|p| KeyboardTarget::key(&p.window, seat, data, key, state, serial, time))
@ -1124,7 +1124,7 @@ impl PointerTarget<State> for CosmicWindow {
}
}
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: u32) {
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: InputTime) {
self.0.with_program(|p| {
let cursor_state = seat.user_data().get::<CursorState>().unwrap();
cursor_state.lock().unwrap().unset_shape();

View file

@ -6,6 +6,7 @@ use crate::{
};
use indexmap::IndexSet;
use smithay::{
backend::input::InputTime,
desktop::{PopupUngrabStrategy, layer_map_for_output},
input::{Seat, pointer::MotionEvent},
output::Output,
@ -419,7 +420,7 @@ fn update_focus_state(
&MotionEvent {
location: new_pos.as_logical(),
serial: SERIAL_COUNTER.next_serial(),
time: 0,
time: InputTime::now(),
},
);
}
@ -768,7 +769,7 @@ fn update_pointer_focus(state: &mut State, seat: &Seat<State>) {
&MotionEvent {
location: pointer.current_location(),
serial: SERIAL_COUNTER.next_serial(),
time: state.common.clock.now().as_millis(),
time: InputTime::now(),
},
);
}

View file

@ -16,7 +16,7 @@ use crate::{
};
use id_tree::NodeId;
use smithay::{
backend::input::KeyState,
backend::input::{InputTime, KeyState},
desktop::{LayerSurface, PopupKind, WindowSurface, WindowSurfaceType, space::SpaceElement},
input::{
Seat,
@ -272,9 +272,10 @@ impl PointerFocusTarget {
None
};
let cursor_hotspot = if let Some(CursorGeometry { hotspot, .. }) =
seat.cursor_geometry((0.0, 0.0), Duration::from_millis(event.time as u64).into())
{
let cursor_hotspot = if let Some(CursorGeometry { hotspot, .. }) = seat.cursor_geometry(
(0.0, 0.0),
Duration::from_millis(event.time.millis() as u64).into(),
) {
hotspot
} else {
Point::from((0, 0))
@ -417,7 +418,7 @@ impl PointerTarget<State> for PointerFocusTarget {
fn frame(&self, seat: &Seat<State>, data: &mut State) {
self.inner_pointer_target().frame(seat, data);
}
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: u32) {
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: InputTime) {
let toplevel = self.toplevel(&data.common.shell.read());
if let Some(element) = toplevel {
for session in element.cursor_sessions() {
@ -593,7 +594,7 @@ impl DndFocus<State> for PointerFocusTarget {
offer: Option<&mut CosmicOfferData<S>>,
seat: &Seat<State>,
location: Point<f64, Logical>,
time: u32,
time: InputTime,
) {
match self {
PointerFocusTarget::WlSurface { surface, .. } => {
@ -695,7 +696,7 @@ impl KeyboardTarget<State> for KeyboardFocusTarget {
key: KeysymHandle<'_>,
state: KeyState,
serial: Serial,
time: u32,
time: InputTime,
) {
if let Some(inner) = self.inner_keyboard_target() {
inner.key(seat, data, key, state, serial, time);

View file

@ -1,7 +1,8 @@
use cosmic_settings_config::shortcuts::Action;
use smithay::{
input::pointer::MotionEvent, reexports::wayland_server::protocol::wl_surface::WlSurface,
utils::SERIAL_COUNTER, wayland::seat::WaylandFocus,
backend::input::InputTime, input::pointer::MotionEvent,
reexports::wayland_server::protocol::wl_surface::WlSurface, utils::SERIAL_COUNTER,
wayland::seat::WaylandFocus,
};
use crate::{
@ -398,7 +399,7 @@ pub fn window_items(
&MotionEvent {
location: loc.as_logical().to_f64(),
serial,
time: state.common.clock.now().as_millis(),
time: InputTime::now(),
},
);
pointer.frame(state);
@ -433,7 +434,7 @@ pub fn window_items(
&MotionEvent {
location: loc.as_logical().to_f64(),
serial,
time: state.common.clock.now().as_millis(),
time: InputTime::now(),
},
);
pointer.frame(state);
@ -468,7 +469,7 @@ pub fn window_items(
&MotionEvent {
location: loc.as_logical().to_f64(),
serial,
time: state.common.clock.now().as_millis(),
time: InputTime::now(),
},
);
pointer.frame(state);
@ -503,7 +504,7 @@ pub fn window_items(
&MotionEvent {
location: loc.as_logical().to_f64(),
serial,
time: state.common.clock.now().as_millis(),
time: InputTime::now(),
},
);
pointer.frame(state);

View file

@ -20,7 +20,7 @@ use smallvec::SmallVec;
use smithay::{
backend::{
drm::DrmNode,
input::ButtonState,
input::{ButtonState, InputTime},
renderer::{
ImportAll, ImportMem,
element::{RenderElement, utils::RescaleRenderElement},
@ -956,7 +956,7 @@ impl Drop for MoveGrab {
&MotionEvent {
location: pointer.current_location(),
serial,
time: state.common.clock.now().as_millis(),
time: InputTime::now(),
},
);
}

View file

@ -11,7 +11,7 @@ use crate::{
};
use id_tree::{NodeId, Tree};
use smithay::{
backend::input::ButtonState,
backend::input::{ButtonState, InputTime},
input::{
Seat,
pointer::{
@ -65,7 +65,7 @@ impl PointerTarget<State> for ResizeForkTarget {
seat: &Seat<State>,
_data: &mut State,
_serial: smithay::utils::Serial,
_time: u32,
_time: InputTime,
) {
let user_data = seat.user_data();
let cursor_state = user_data.get::<CursorState>().unwrap();

View file

@ -1,6 +1,6 @@
use cosmic_settings_config::shortcuts;
use smithay::{
backend::input::{KeyState, Keycode},
backend::input::{InputTime, KeyState, Keycode},
input::{
Seat, SeatHandler,
keyboard::{
@ -38,7 +38,7 @@ impl KeyboardGrab<State> for SwapWindowGrab {
state: KeyState,
modifiers: Option<ModifiersState>,
serial: Serial,
time: u32,
time: InputTime,
) {
if !matches!(&data.common.shell.read().overview_mode.active_trigger(), Some(Trigger::KeyboardSwap(_, d)) if d == &self.desc)
{

View file

@ -11,7 +11,7 @@ use cosmic_comp_config::{ZoomConfig, ZoomMovement};
use cosmic_config::ConfigSet;
use keyframe::{ease, functions::Linear};
use smithay::{
backend::renderer::ImportMem,
backend::{input::InputTime, renderer::ImportMem},
desktop::space::SpaceElement,
input::{
Seat,
@ -1023,7 +1023,7 @@ impl PointerTarget<State> for ZoomFocusTarget {
}
}
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: u32) {
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: InputTime) {
match self {
ZoomFocusTarget::Main(elem) => PointerTarget::leave(elem, seat, data, serial, time),
ZoomFocusTarget::Menu(elem) => PointerTarget::leave(elem, seat, data, serial, time),