fix: send frame callbacks to cursor surfaces
This commit is contained in:
1 parent
dccf83c8fa
commit
a2a80b70b5
3 files changed
+19
-2
No files matched your search
@@ -380,6 +380,7 @@ fn send_frame_callbacks(state: &mut Ferese) {
|
|||||||
|_, _| Some(output.clone()),
|
|_, _| Some(output.clone()),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
state.send_cursor_frame(&output);
|
||||||
state.space.refresh();
|
state.space.refresh();
|
||||||
state.popups.cleanup();
|
state.popups.cleanup();
|
||||||
if let Err(error) = state.display_handle.flush_clients() {
|
if let Err(error) = state.display_handle.flush_clients() {
|
||||||
|
|||||||
+17
-2
@@ -3,7 +3,7 @@ use std::{
|
|||||||
error::Error,
|
error::Error,
|
||||||
ffi::OsString,
|
ffi::OsString,
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
time::Instant,
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
use ferese_animation::{ClientSize, SpringConfig, WindowGeometry};
|
use ferese_animation::{ClientSize, SpringConfig, WindowGeometry};
|
||||||
@@ -12,8 +12,9 @@ use ferese_layout::{Axis, Direction, GapConfig, LayoutResult, Rect, SizeConstrai
|
|||||||
|
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::drm::DrmEventTime,
|
backend::drm::DrmEventTime,
|
||||||
desktop::{PopupManager, Space, Window, WindowSurfaceType},
|
desktop::{PopupManager, Space, Window, WindowSurfaceType, utils::send_frames_surface_tree},
|
||||||
input::{Seat, SeatState, pointer::CursorImageStatus},
|
input::{Seat, SeatState, pointer::CursorImageStatus},
|
||||||
|
output::Output,
|
||||||
reexports::{
|
reexports::{
|
||||||
calloop::{EventLoop, Interest, LoopSignal, Mode, PostAction, generic::Generic},
|
calloop::{EventLoop, Interest, LoopSignal, Mode, PostAction, generic::Generic},
|
||||||
wayland_protocols::xdg::shell::server::xdg_toplevel,
|
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> {
|
pub fn window_under_visual(&self, position: Point<f64, Logical>) -> Option<Window> {
|
||||||
self.space.elements().rev().find_map(|window| {
|
self.space.elements().rev().find_map(|window| {
|
||||||
let id = self.window_ids.get(window)?;
|
let id = self.window_ids.get(window)?;
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ pub fn init(event_loop: &mut EventLoop<Ferese>, state: &mut Ferese) -> Result<()
|
|||||||
|_, _| Some(output.clone()),
|
|_, _| Some(output.clone()),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
state.send_cursor_frame(&output);
|
||||||
state.space.refresh();
|
state.space.refresh();
|
||||||
state.popups.cleanup();
|
state.popups.cleanup();
|
||||||
if let Err(error) = state.display_handle.flush_clients() {
|
if let Err(error) = state.display_handle.flush_clients() {
|
||||||
|
|||||||
Reference in new issue
Block a user