1
0
Fork 0
forked from wry/wry

config: allow consuming/forwarding key events

This commit is contained in:
Julian Orth 2024-04-15 18:42:59 +02:00
parent 6ee4fdb9f4
commit 18bc86d14f
12 changed files with 106 additions and 13 deletions

View file

@ -175,6 +175,7 @@ pub struct WlSeatGlobal {
text_input: CloneCell<Option<Rc<ZwpTextInputV3>>>,
input_method: CloneCell<Option<Rc<ZwpInputMethodV2>>>,
input_method_grab: CloneCell<Option<Rc<ZwpInputMethodKeyboardGrabV2>>>,
forward: Cell<bool>,
}
const CHANGE_CURSOR_MOVED: u32 = 1 << 0;
@ -243,6 +244,7 @@ impl WlSeatGlobal {
text_input: Default::default(),
input_method: Default::default(),
input_method_grab: Default::default(),
forward: Cell::new(false),
});
state.add_cursor_size(*DEFAULT_CURSOR_SIZE);
let seat = slf.clone();
@ -1146,6 +1148,10 @@ impl WlSeatGlobal {
}
}
}
pub fn set_forward(&self, forward: bool) {
self.forward.set(forward);
}
}
global_base!(WlSeatGlobal, WlSeat, WlSeatError);