1
0
Fork 0
forked from wry/wry

autocommit 2022-02-24 16:30:11 CET

This commit is contained in:
Julian Orth 2022-02-24 16:30:11 +01:00
parent 666e475032
commit 7d28d30666
39 changed files with 1670 additions and 209 deletions

19
src/tree/toplevel.rs Normal file
View file

@ -0,0 +1,19 @@
use std::rc::Rc;
use crate::ifs::wl_seat::WlSeatGlobal;
use crate::ifs::wl_surface::WlSurface;
use crate::tree::Node;
use crate::utils::linkedlist::LinkedNode;
pub trait ToplevelNode: Node {
fn parent(&self) -> Option<Rc<dyn Node>>;
fn focus_surface(&self, seat: &WlSeatGlobal) -> Rc<WlSurface>;
fn set_focus_history_link(&self, seat: &WlSeatGlobal, link: LinkedNode<Rc<dyn ToplevelNode>>);
fn as_node(&self) -> &dyn Node;
fn parent_is_float(&self) -> bool {
if let Some(parent) = self.parent() {
return parent.is_float();
}
false
}
}