aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Access <ShootingStarDragons@protonmail.com>2024-02-20 17:53:20 +0800
committerLibravatar GitHub <noreply@github.com>2024-02-20 10:53:20 +0100
commit7c11c463a3e7f821ed9f3c6de59e37358441952e (patch)
tree1b57ec2c30b93269391490ffae0f84d0e8016218 /include
parentxdg-activation: distinguish activation and urgency requests (diff)
downloadsway-7c11c463a3e7f821ed9f3c6de59e37358441952e.tar.gz
sway-7c11c463a3e7f821ed9f3c6de59e37358441952e.tar.zst
sway-7c11c463a3e7f821ed9f3c6de59e37358441952e.zip
text_input: Implement input-method popups
Co-authored-by: tadeokondrak <me@tadeo.ca>
Diffstat (limited to 'include')
-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 {
21 struct sway_seat *seat; 21 struct sway_seat *seat;
22 22
23 struct wl_list text_inputs; // sway_text_input::link 23 struct wl_list text_inputs; // sway_text_input::link
24 struct wl_list input_popups; // sway_input_popup::link
24 struct wlr_input_method_v2 *input_method; // doesn't have to be present 25 struct wlr_input_method_v2 *input_method; // doesn't have to be present
25 26
26 struct wl_listener text_input_new; 27 struct wl_listener text_input_new;
27 28
28 struct wl_listener input_method_new; 29 struct wl_listener input_method_new;
29 struct wl_listener input_method_commit; 30 struct wl_listener input_method_commit;
31 struct wl_listener input_method_new_popup_surface;
30 struct wl_listener input_method_grab_keyboard; 32 struct wl_listener input_method_grab_keyboard;
31 struct wl_listener input_method_destroy; 33 struct wl_listener input_method_destroy;
32 34
33 struct wl_listener input_method_keyboard_grab_destroy; 35 struct wl_listener input_method_keyboard_grab_destroy;
34}; 36};
35 37
38
36struct sway_text_input { 39struct sway_text_input {
37 struct sway_input_method_relay *relay; 40 struct sway_input_method_relay *relay;
38 41
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 @@
1#ifndef _SWAY_INPUT_TEXT_INPUT_POPUP_H
2#define _SWAY_INPUT_TEXT_INPUT_POPUP_H
3
4#include "sway/tree/view.h"
5
6struct sway_input_popup {
7 struct sway_input_method_relay *relay;
8
9 struct wlr_scene_tree *scene_tree;
10 struct sway_popup_desc desc;
11 struct wlr_input_popup_surface_v2 *popup_surface;
12
13 struct wl_list link;
14
15 struct wl_listener popup_destroy;
16 struct wl_listener popup_surface_commit;
17
18 struct wl_listener focused_surface_unmap;
19};
20#endif