wayland: only bind to input method when enabled
Having multiple input methods at once causes behaviour defined by the Wayland compositor. In a recent update by Phoc, the most recently started input method would take priority to demonstrate the instability. Since the keyboard driver for Wayland can handle a emitting input without an input method, only try to bind to an input method when it is enabled.
This commit is contained in:
parent
4cd29eec3b
commit
7276aa9f91
1 changed files with 10 additions and 6 deletions
|
|
@ -68,14 +68,18 @@ impl Dispatcher {
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let im_man = match globals.bind(&queue, 1..=1, ()) {
|
let im_man = if cfg.wayland_im_enable() {
|
||||||
Ok(g) => Some(g),
|
|
||||||
Err(_) => None,
|
|
||||||
};
|
|
||||||
|
|
||||||
let _: Result<zwp_input_method_v1::ZwpInputMethodV1, BindError>
|
let _: Result<zwp_input_method_v1::ZwpInputMethodV1, BindError>
|
||||||
= globals.bind(&queue, 1..=1, ());
|
= globals.bind(&queue, 1..=1, ());
|
||||||
|
|
||||||
|
match globals.bind(&queue, 1..=1, ()) {
|
||||||
|
Ok(g) => Some(g),
|
||||||
|
Err(_) => None,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
let frac_scale_man = match globals.bind(&queue, 1..=1, ()) {
|
let frac_scale_man = match globals.bind(&queue, 1..=1, ()) {
|
||||||
Ok(g) => Some(g),
|
Ok(g) => Some(g),
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue