seat: remove dead self-move code
This commit is contained in:
parent
06fe5b15e1
commit
fb8d4c2700
4 changed files with 5 additions and 27 deletions
|
|
@ -67,8 +67,8 @@ use {
|
|||
state::{DeviceHandlerData, State},
|
||||
time::now_usec,
|
||||
tree::{
|
||||
generic_node_visitor, ContainerNode, ContainerSplit, Direction, FloatNode, FoundNode,
|
||||
Node, OutputNode, ToplevelNode, WorkspaceNode,
|
||||
generic_node_visitor, ContainerNode, ContainerSplit, Direction, FoundNode, Node,
|
||||
OutputNode, ToplevelNode, WorkspaceNode,
|
||||
},
|
||||
utils::{
|
||||
asyncevent::AsyncEvent, bindings::PerClientBindings, clonecell::CloneCell,
|
||||
|
|
@ -140,9 +140,6 @@ pub struct WlSeatGlobal {
|
|||
name: GlobalName,
|
||||
state: Rc<State>,
|
||||
seat_name: String,
|
||||
move_: Cell<bool>,
|
||||
move_start_pos: Cell<(Fixed, Fixed)>,
|
||||
extents_start_pos: Cell<(i32, i32)>,
|
||||
pos_time_usec: Cell<u64>,
|
||||
pos: Cell<(Fixed, Fixed)>,
|
||||
pointer_stack: RefCell<Vec<Rc<dyn Node>>>,
|
||||
|
|
@ -220,9 +217,6 @@ impl WlSeatGlobal {
|
|||
name,
|
||||
state: state.clone(),
|
||||
seat_name: seat_name.to_string(),
|
||||
move_: Cell::new(false),
|
||||
move_start_pos: Cell::new((Fixed(0), Fixed(0))),
|
||||
extents_start_pos: Cell::new((0, 0)),
|
||||
pos_time_usec: Cell::new(0),
|
||||
pos: Cell::new((Fixed(0), Fixed(0))),
|
||||
pointer_stack: RefCell::new(vec![]),
|
||||
|
|
@ -1235,10 +1229,6 @@ impl WlSeat {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn move_(&self, node: &Rc<FloatNode>) {
|
||||
self.global.move_(node);
|
||||
}
|
||||
|
||||
pub fn keymap_fd(&self, state: &KeyboardState) -> Result<Rc<OwnedFd>, WlKeyboardError> {
|
||||
if self.version >= READ_ONLY_KEYMAP_SINCE {
|
||||
return Ok(state.map.clone());
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ use {
|
|||
},
|
||||
object::Version,
|
||||
state::DeviceHandlerData,
|
||||
tree::{Direction, FloatNode, Node, ToplevelNode},
|
||||
tree::{Direction, Node, ToplevelNode},
|
||||
utils::{bitflags::BitflagsExt, smallmap::SmallMap},
|
||||
wire::WlDataOfferId,
|
||||
xkbcommon::{KeyboardState, XkbState, XKB_KEY_DOWN, XKB_KEY_UP},
|
||||
|
|
@ -631,13 +631,6 @@ impl WlSeatGlobal {
|
|||
self.pointer_stack.borrow().last().cloned()
|
||||
}
|
||||
|
||||
pub fn move_(&self, node: &Rc<FloatNode>) {
|
||||
self.move_.set(true);
|
||||
self.move_start_pos.set(self.pos.get());
|
||||
let ex = node.position.get();
|
||||
self.extents_start_pos.set((ex.x1(), ex.y1()));
|
||||
}
|
||||
|
||||
pub fn focus_toplevel(self: &Rc<Self>, n: Rc<dyn ToplevelNode>) {
|
||||
let node = match n.tl_focus_child(self.id) {
|
||||
Some(n) => n,
|
||||
|
|
|
|||
|
|
@ -260,13 +260,7 @@ impl XdgToplevelRequestHandler for XdgToplevel {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn move_(&self, req: Move, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||
let seat = self.xdg.surface.client.lookup(req.seat)?;
|
||||
if let Some(parent) = self.toplevel_data.parent.get() {
|
||||
if let Some(float) = parent.node_into_float() {
|
||||
seat.move_(&float);
|
||||
}
|
||||
}
|
||||
fn move_(&self, _req: Move, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ pub trait Node: 'static {
|
|||
|
||||
// TYPE CONVERTERS
|
||||
|
||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
||||
fn node_into_float(self: Rc<Self>) -> Option<Rc<FloatNode>> {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue