From 7a69d64e46eea3e287f5c588b4b59e244390eae7 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 7 Jan 2023 10:15:56 -0500 Subject: [PATCH] refactor(wayland): remove commented out code\ --- src/wayland/decoration.rs | 19 ----------------- src/wayland/xdg_shell.rs | 45 --------------------------------------- 2 files changed, 64 deletions(-) diff --git a/src/wayland/decoration.rs b/src/wayland/decoration.rs index cb9a14f..54dee64 100644 --- a/src/wayland/decoration.rs +++ b/src/wayland/decoration.rs @@ -20,25 +20,6 @@ use smithay::{ wayland::shell::{self, kde::decoration::KdeDecorationHandler}, }; -// impl XdgDecorationHandler for WaylandState { -// fn new_decoration(&mut self, toplevel: smithay::wayland::shell::xdg::ToplevelSurface) { -// toplevel.with_pending_state(|state| { -// state.decoration_mode = Some(Mode::ServerSide); -// }); -// toplevel.send_configure(); -// } - -// fn request_mode( -// &mut self, -// _toplevel: smithay::wayland::shell::xdg::ToplevelSurface, -// _mode: smithay::reexports::wayland_protocols::xdg::decoration::zv1::server::zxdg_toplevel_decoration_v1::Mode, -// ) { -// } - -// fn unset_mode(&mut self, _toplevel: smithay::wayland::shell::xdg::ToplevelSurface) {} -// } -// delegate_xdg_decoration!(WaylandState); - impl GlobalDispatch for WaylandState { fn bind( _state: &mut WaylandState, diff --git a/src/wayland/xdg_shell.rs b/src/wayland/xdg_shell.rs index cac4036..d876aae 100644 --- a/src/wayland/xdg_shell.rs +++ b/src/wayland/xdg_shell.rs @@ -1,5 +1,4 @@ use std::sync::Arc; - use super::{ panel_item::{PanelItem, RecommendedState, ToplevelState}, state::WaylandState, @@ -26,50 +25,6 @@ use smithay::{ wayland::compositor, }; -// impl XdgShellHandler for WaylandState { -// fn xdg_shell_state(&mut self) -> &mut WaylandState { -// &mut self.xdg_shell_state -// } - -// fn new_toplevel(&mut self, surface: ToplevelSurface) { -// self.output.enter(surface.wl_surface()); -// surface.with_pending_state(|state| { -// state.states.set(State::Maximized); -// state.states.set(State::Activated); -// state.decoration_mode = Some(Mode::ServerSide); -// }); -// surface.send_configure(); - -// let client = surface.wl_surface().client().unwrap(); -// let (node, item) = PanelItem::create( -// &surface, -// client.get_credentials(&self.display_handle).ok(), -// self.seats.get(&client.id()).unwrap().clone(), -// ); -// compositor::with_states(surface.wl_surface(), |surface_data| { -// surface_data.data_map.insert_if_missing_threadsafe(|| node); -// surface_data.data_map.insert_if_missing_threadsafe(|| item); -// }); -// } -// fn new_popup(&mut self, surface: PopupSurface, _positioner: PositionerState) { -// self.output.enter(surface.wl_surface()); -// let _ = surface.send_configure(); -// // let panel_item = compositor::with_states(&surface.get_parent_surface().unwrap(), |data| { -// // data.data_map.get::>().cloned() -// // }); -// } -// fn ack_configure(&mut self, surface: WlSurface, configure: Configure) { -// compositor::with_states(&surface, |data| { -// if let Some(panel_item) = data.data_map.get::>() { -// panel_item.ack_resize(configure); -// } -// }); -// } - -// fn grab(&mut self, _surface: PopupSurface, _seat: WlSeat, _serial: Serial) {} -// } -// delegate_xdg_shell!(WaylandState); - impl GlobalDispatch for WaylandState { fn bind( _state: &mut WaylandState,