1
0
Fork 0
forked from wry/wry

autocommit 2022-02-01 23:33:59 CET

This commit is contained in:
Julian Orth 2022-02-01 23:33:59 +01:00
parent 41c5f8cf89
commit 2dbe3ba732
21 changed files with 814 additions and 86 deletions

View file

@ -16,6 +16,7 @@ use std::fmt::Display;
use std::ops::Deref;
use std::rc::Rc;
pub use workspace::*;
use crate::cursor::KnownCursor;
mod container;
mod workspace;
@ -126,6 +127,10 @@ pub trait Node {
let _ = y;
}
fn pointer_target(&self, seat: &Rc<WlSeatGlobal>) {
let _ = seat;
}
fn motion(&self, seat: &WlSeatGlobal, x: Fixed, y: Fixed) {
let _ = seat;
let _ = x;
@ -249,6 +254,10 @@ impl Node for DisplayNode {
}
FindTreeResult::AcceptsInput
}
fn pointer_target(&self, seat: &Rc<WlSeatGlobal>) {
seat.set_known_cursor(KnownCursor::Default);
}
}
tree_id!(OutputNodeId);
@ -298,6 +307,10 @@ impl Node for OutputNode {
self.workspace.set(None);
}
fn pointer_target(&self, seat: &Rc<WlSeatGlobal>) {
seat.set_known_cursor(KnownCursor::Default);
}
fn render(&self, renderer: &mut Renderer, x: i32, y: i32) {
renderer.render_output(self, x, y);
}
@ -376,6 +389,10 @@ impl Node for FloatNode {
.set(Rect::new_sized(pos.x1(), pos.x2(), width, height).unwrap());
}
fn pointer_target(&self, seat: &Rc<WlSeatGlobal>) {
seat.set_known_cursor(KnownCursor::Default);
}
fn render(&self, renderer: &mut Renderer, x: i32, y: i32) {
renderer.render_floating(self, x, y)
}