From a242e4a65d0f6e58520d014ad96eb38ebfcd831a Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 26 Mar 2023 11:04:01 +0200 Subject: Implement methods Fl_Wayland_Screen_Driver::en/disable_im() --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.H | 2 ++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H index 6aaea6af5..4662efce6 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H @@ -169,6 +169,8 @@ public: void *control_maximize_button(void *data) FL_OVERRIDE; int event_key(int k) FL_OVERRIDE; int get_key(int k) FL_OVERRIDE; + void enable_im() FL_OVERRIDE; + void disable_im() FL_OVERRIDE; // Wayland-specific member functions void screen_count_set(int count) {num_screens = count;} diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 8a8a8b042..ef19578cf 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -802,6 +802,16 @@ static const struct wl_keyboard_listener wl_keyboard_listener = { }; +void Fl_Wayland_Screen_Driver::enable_im() { + if (seat->text_input) zwp_text_input_v3_enable(seat->text_input); +} + + +void Fl_Wayland_Screen_Driver::disable_im() { + if (seat->text_input) zwp_text_input_v3_disable(seat->text_input); +} + + void text_input_enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, struct wl_surface *surface) { //puts("text_input_enter"); -- cgit v1.2.3