input: Fix passed button events
This commit is contained in:
parent
5006eae60b
commit
b85b8fc7eb
1 changed files with 14 additions and 10 deletions
|
|
@ -1035,16 +1035,20 @@ impl State {
|
|||
};
|
||||
|
||||
let ptr = seat.get_pointer().unwrap();
|
||||
ptr.button(
|
||||
self,
|
||||
&ButtonEvent {
|
||||
button,
|
||||
state: event.state(),
|
||||
serial,
|
||||
time: event.time_msec(),
|
||||
},
|
||||
);
|
||||
ptr.frame(self);
|
||||
if pass_event {
|
||||
ptr.button(
|
||||
self,
|
||||
&ButtonEvent {
|
||||
button,
|
||||
state: event.state(),
|
||||
serial,
|
||||
time: event.time_msec(),
|
||||
},
|
||||
);
|
||||
ptr.frame(self);
|
||||
} else if event.state() == ButtonState::Released {
|
||||
ptr.unset_grab(self, serial, event.time_msec())
|
||||
}
|
||||
}
|
||||
InputEvent::PointerAxis { event, .. } => {
|
||||
let scroll_factor =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue