Render cursors
This commit is contained in:
parent
4e238d8848
commit
db6ca9e61c
10 changed files with 481 additions and 46 deletions
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::state::Common;
|
||||
use crate::{
|
||||
backend::cursor,
|
||||
input::{set_active_output, Devices},
|
||||
state::{BackendData, State},
|
||||
state::{BackendData, State, Common},
|
||||
};
|
||||
use anyhow::{Context, Result};
|
||||
use smithay::{
|
||||
|
|
@ -58,6 +58,17 @@ impl WinitState {
|
|||
|
||||
let space = state.spaces.active_space_mut(&self.output);
|
||||
let mut backend = self.backend.borrow_mut();
|
||||
|
||||
for seat in &state.seats {
|
||||
if let Some(cursor) = cursor::draw_cursor(
|
||||
backend.renderer(),
|
||||
seat,
|
||||
&state.start_time,
|
||||
false,
|
||||
) {
|
||||
custom_elements.push(cursor)
|
||||
}
|
||||
}
|
||||
|
||||
backend.bind().with_context(|| "Failed to bind buffer")?;
|
||||
let age = backend.buffer_age().unwrap_or(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue