summaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorZephyr Lykos <[email protected]>2024-08-14 04:39:55 +0000
committerGitHub <[email protected]>2024-08-14 00:39:55 -0400
commit19f76f3dcd0dfb19826c6f5ea55a0d6c37e2bcd8 (patch)
tree5d0ddf468570562be56d92a945584e0032ce8820 /sway/desktop/render.c
parentc861623887ca88fdbf4752a3623f4b5b146b1995 (diff)
text_input: Implement input-method popups (#315)
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index e469d716..16d7b87f 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -446,6 +446,15 @@ static void render_unmanaged(struct fx_render_context *ctx, struct wl_list *unma
}
#endif
+static void render_input_popups(struct fx_render_context *ctx, struct wl_list *input_popups) {
+ struct render_data data = {
+ .deco_data = get_undecorated_decoration_data(),
+ .ctx = ctx,
+ };
+ output_input_popups_for_each_surface(ctx->output, input_popups,
+ render_surface_iterator, &data);
+}
+
static void render_drag_icons(struct fx_render_context *ctx, struct wl_list *drag_icons) {
struct render_data data = {
.deco_data = get_undecorated_decoration_data(),
@@ -1661,6 +1670,9 @@ void output_render(struct fx_render_context *ctx) {
goto renderer_end;
}
+ struct sway_seat *seat = input_manager_current_seat();
+ struct sway_container *focus = seat_get_focused_container(seat);
+
if (output_has_opaque_overlay_layer_surface(output)) {
goto render_overlay;
}
@@ -1796,8 +1808,6 @@ void output_render(struct fx_render_context *ctx) {
render_seatops(ctx);
- struct sway_seat *seat = input_manager_current_seat();
- struct sway_container *focus = seat_get_focused_container(seat);
if (focus && focus->view) {
struct decoration_data deco_data = {
.alpha = focus->alpha,
@@ -1820,6 +1830,7 @@ render_overlay:
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
render_layer_popups(ctx,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
+ render_input_popups(ctx, &seat->im_relay.input_popups);
render_drag_icons(ctx, &root->drag_icons);
renderer_end: