fix: send frame callbacks to cursor surfaces

This commit is contained in:
Samuel Onoja committed 2026-09-24 16:49:14 +01:00
1 parent dccf83c8fa
commit a2a80b70b5
3 files changed
+19 -2

No files matched your search

+17 -2
View File
@@ -3,7 +3,7 @@ use std::{
error::Error,
ffi::OsString,
sync::Arc,
time::Instant,
time::{Duration, Instant},
};
use ferese_animation::{ClientSize, SpringConfig, WindowGeometry};
@@ -12,8 +12,9 @@ use ferese_layout::{Axis, Direction, GapConfig, LayoutResult, Rect, SizeConstrai
use smithay::{
backend::drm::DrmEventTime,
desktop::{PopupManager, Space, Window, WindowSurfaceType},
desktop::{PopupManager, Space, Window, WindowSurfaceType, utils::send_frames_surface_tree},
input::{Seat, SeatState, pointer::CursorImageStatus},
output::Output,
reexports::{
calloop::{EventLoop, Interest, LoopSignal, Mode, PostAction, generic::Generic},
wayland_protocols::xdg::shell::server::xdg_toplevel,
@@ -191,6 +192,20 @@ impl Ferese {
})
}
pub fn send_cursor_frame(&self, output: &Output) {
let CursorImageStatus::Surface(surface) = &self.cursor_status else {
return;
};
send_frames_surface_tree(
surface,
output,
self.start_time.elapsed(),
Some(Duration::ZERO),
|_, _| Some(output.clone()),
);
}
pub fn window_under_visual(&self, position: Point<f64, Logical>) -> Option<Window> {
self.space.elements().rev().find_map(|window| {
let id = self.window_ids.get(window)?;