seat: uniformly convert scroll steps to scroll px
This commit is contained in:
parent
2a9c746781
commit
b89d72fcd9
7 changed files with 23 additions and 58 deletions
|
|
@ -9,7 +9,7 @@ use {
|
|||
},
|
||||
rect::Rect,
|
||||
render::{Renderer, Texture},
|
||||
state::{DeviceHandlerData, State},
|
||||
state::State,
|
||||
text,
|
||||
tree::{
|
||||
walker::NodeVisitor, ContainingNode, Direction, FindTreeResult, FoundNode, Node,
|
||||
|
|
@ -1162,12 +1162,7 @@ impl Node for ContainerNode {
|
|||
}
|
||||
}
|
||||
|
||||
fn node_on_axis_event(
|
||||
self: Rc<Self>,
|
||||
_dev: &DeviceHandlerData,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
event: &PendingScroll,
|
||||
) {
|
||||
fn node_on_axis_event(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, event: &PendingScroll) {
|
||||
let mut seat_datas = self.seats.borrow_mut();
|
||||
let seat_data = match seat_datas.get_mut(&seat.id()) {
|
||||
Some(s) => s,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use {
|
|||
},
|
||||
rect::Rect,
|
||||
render::{Renderer, Texture},
|
||||
state::{DeviceHandlerData, State},
|
||||
state::State,
|
||||
text,
|
||||
tree::{
|
||||
walker::NodeVisitor, Direction, FindTreeResult, FoundNode, Node, NodeId, WorkspaceNode,
|
||||
|
|
@ -577,12 +577,7 @@ impl Node for OutputNode {
|
|||
self.state.tree_changed();
|
||||
}
|
||||
|
||||
fn node_on_axis_event(
|
||||
self: Rc<Self>,
|
||||
_dev: &DeviceHandlerData,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
event: &PendingScroll,
|
||||
) {
|
||||
fn node_on_axis_event(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, event: &PendingScroll) {
|
||||
let steps = match self.scroll.handle(event) {
|
||||
Some(e) => e,
|
||||
_ => return,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue