wayland: update support for text insertion according to input method
This commit is contained in:
parent
c459405318
commit
619b0232b5
2 changed files with 8 additions and 0 deletions
|
|
@ -442,9 +442,11 @@ impl Dispatch<zwp_input_method_v2::ZwpInputMethodV2, ()> for Dispatcher {
|
||||||
{
|
{
|
||||||
match evt {
|
match evt {
|
||||||
zwp_input_method_v2::Event::Activate => {
|
zwp_input_method_v2::Event::Activate => {
|
||||||
|
ctx.seat.set_text_supported(true);
|
||||||
ctx.show();
|
ctx.show();
|
||||||
},
|
},
|
||||||
zwp_input_method_v2::Event::Deactivate => {
|
zwp_input_method_v2::Event::Deactivate => {
|
||||||
|
ctx.seat.set_text_supported(false);
|
||||||
ctx.hide();
|
ctx.hide();
|
||||||
},
|
},
|
||||||
zwp_input_method_v2::Event::TextChangeCause { .. } => (),
|
zwp_input_method_v2::Event::TextChangeCause { .. } => (),
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,12 @@ impl<D: Display, K: Keyboard,
|
||||||
self.button.mod_state()
|
self.button.mod_state()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn set_text_supported(&mut self, text_supp: bool)
|
||||||
|
{
|
||||||
|
self.button.set_text_supported(text_supp)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn set_capabilities(&mut self, caps: wl_seat::Capability)
|
pub fn set_capabilities(&mut self, caps: wl_seat::Capability)
|
||||||
{
|
{
|
||||||
if caps.contains(wl_seat::Capability::Pointer) {
|
if caps.contains(wl_seat::Capability::Pointer) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue