1
0
Fork 0
forked from wry/wry

all: remove dead code

This commit is contained in:
Julian Orth 2024-05-02 19:37:19 +02:00
parent a20008d446
commit 8cee61122e
32 changed files with 9 additions and 145 deletions

View file

@ -1342,8 +1342,6 @@ impl Node for ContainerNode {
}
impl ContainingNode for ContainerNode {
containing_node_impl!();
fn cnode_replace_child(self: Rc<Self>, old: &dyn Node, new: Rc<dyn ToplevelNode>) {
let node = match self.child_nodes.borrow_mut().remove(&old.node_id()) {
Some(c) => c,

View file

@ -4,10 +4,6 @@ use {
};
pub trait ContainingNode: Node {
fn cnode_as_node(&self) -> &dyn Node;
fn cnode_into_node(self: Rc<Self>) -> Rc<dyn Node>;
fn cnode_into_dyn(self: Rc<Self>) -> Rc<dyn ContainingNode>;
fn cnode_replace_child(self: Rc<Self>, old: &dyn Node, new: Rc<dyn ToplevelNode>);
fn cnode_remove_child(self: Rc<Self>, child: &dyn Node) {
self.cnode_remove_child2(child, false);

View file

@ -586,8 +586,6 @@ impl Node for FloatNode {
}
impl ContainingNode for FloatNode {
containing_node_impl!();
fn cnode_replace_child(self: Rc<Self>, _old: &dyn Node, new: Rc<dyn ToplevelNode>) {
self.discard_child_properties();
self.child.set(Some(new.clone()));

View file

@ -912,14 +912,6 @@ impl Node for OutputNode {
fn node_on_pointer_motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
self.pointer_move(seat, x.round_down(), y.round_down());
}
fn node_into_output(self: Rc<Self>) -> Option<Rc<OutputNode>> {
Some(self.clone())
}
fn node_is_output(&self) -> bool {
true
}
}
pub fn calculate_logical_size(

View file

@ -1,9 +1,7 @@
use {crate::tree::Node, std::rc::Rc};
pub trait StackedNode: Node {
fn stacked_as_node(&self) -> &dyn Node;
fn stacked_into_node(self: Rc<Self>) -> Rc<dyn Node>;
fn stacked_into_dyn(self: Rc<Self>) -> Rc<dyn StackedNode>;
fn stacked_prepare_set_visible(&self) {
// nothing
}

View file

@ -291,8 +291,6 @@ impl Node for WorkspaceNode {
}
impl ContainingNode for WorkspaceNode {
containing_node_impl!();
fn cnode_replace_child(self: Rc<Self>, old: &dyn Node, new: Rc<dyn ToplevelNode>) {
if let Some(container) = self.container.get() {
if container.node_id() == old.node_id() {