all: use trait upcasting
This commit is contained in:
parent
f0caafc862
commit
09e5f89174
44 changed files with 90 additions and 269 deletions
|
|
@ -77,7 +77,6 @@ impl TrayItemData {
|
|||
pub trait DynTrayItem: Node {
|
||||
fn send_current_configure(&self);
|
||||
fn data(&self) -> &TrayItemData;
|
||||
fn into_node(self: Rc<Self>) -> Rc<dyn Node>;
|
||||
fn set_position(&self, abs_pos: Rect, rel_pos: Rect);
|
||||
fn destroy_popups(&self);
|
||||
fn destroy_node(&self);
|
||||
|
|
@ -93,10 +92,6 @@ impl<T: TrayItem> DynTrayItem for T {
|
|||
<Self as TrayItem>::data(self)
|
||||
}
|
||||
|
||||
fn into_node(self: Rc<Self>) -> Rc<dyn Node> {
|
||||
self
|
||||
}
|
||||
|
||||
fn set_position(&self, abs_pos: Rect, rel_pos: Rect) {
|
||||
let data = self.data();
|
||||
data.surface
|
||||
|
|
|
|||
|
|
@ -488,8 +488,6 @@ impl ToplevelNodeBase for Xwindow {
|
|||
}
|
||||
|
||||
impl StackedNode for Xwindow {
|
||||
stacked_node_impl!();
|
||||
|
||||
fn stacked_set_visible(&self, visible: bool) {
|
||||
self.damage_override_redirect();
|
||||
self.tl_set_visible(visible);
|
||||
|
|
|
|||
|
|
@ -356,8 +356,6 @@ impl Node for XdgPopup {
|
|||
}
|
||||
|
||||
impl StackedNode for XdgPopup {
|
||||
stacked_node_impl!();
|
||||
|
||||
fn stacked_prepare_set_visible(&self) {
|
||||
self.set_visible_prepared.set(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue