aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorAccess <ShootingStarDragons@protonmail.com>2024-02-20 17:53:20 +0800
committerGitHub <noreply@github.com>2024-02-20 10:53:20 +0100
commit7c11c463a3e7f821ed9f3c6de59e37358441952e (patch)
tree1b57ec2c30b93269391490ffae0f84d0e8016218 /include/sway
parentd19810eba8959f052d91fd6609cef6adf36b3951 (diff)
text_input: Implement input-method popups
Co-authored-by: tadeokondrak <me@tadeo.ca>
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/input/text_input.h3
-rw-r--r--include/sway/input/text_input_popup.h20
2 files changed, 23 insertions, 0 deletions
diff --git a/include/sway/input/text_input.h b/include/sway/input/text_input.h
index 214e61d1..1993f928 100644
--- a/include/sway/input/text_input.h
+++ b/include/sway/input/text_input.h
@@ -21,18 +21,21 @@ struct sway_input_method_relay {
struct sway_seat *seat;
struct wl_list text_inputs; // sway_text_input::link
+ struct wl_list input_popups; // sway_input_popup::link
struct wlr_input_method_v2 *input_method; // doesn't have to be present
struct wl_listener text_input_new;
struct wl_listener input_method_new;
struct wl_listener input_method_commit;
+ struct wl_listener input_method_new_popup_surface;
struct wl_listener input_method_grab_keyboard;
struct wl_listener input_method_destroy;
struct wl_listener input_method_keyboard_grab_destroy;
};
+
struct sway_text_input {
struct sway_input_method_relay *relay;
diff --git a/include/sway/input/text_input_popup.h b/include/sway/input/text_input_popup.h
new file mode 100644
index 00000000..e5f6ab8b
--- /dev/null
+++ b/include/sway/input/text_input_popup.h
@@ -0,0 +1,20 @@
+#ifndef _SWAY_INPUT_TEXT_INPUT_POPUP_H
+#define _SWAY_INPUT_TEXT_INPUT_POPUP_H
+
+#include "sway/tree/view.h"
+
+struct sway_input_popup {
+ struct sway_input_method_relay *relay;
+
+ struct wlr_scene_tree *scene_tree;
+ struct sway_popup_desc desc;
+ struct wlr_input_popup_surface_v2 *popup_surface;
+
+ struct wl_list link;
+
+ struct wl_listener popup_destroy;
+ struct wl_listener popup_surface_commit;
+
+ struct wl_listener focused_surface_unmap;
+};
+#endif