summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-14 15:27:42 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-14 15:27:42 +0300
commitb2f963670845e7e1bcb9f3b141e12ea7ba7560a4 (patch)
tree1ea088d27ad7103c17fe237a22cf2fffee39c3a3 /src
parentf288612f177711207be3e077922c09925d7c0063 (diff)
Resend the text input caret when the surface scale changes
The caret's logical rectangle depends on the surface scale. A scale change left the compositor with the old rectangle until the app sent a new caret. Send the caret again on every rescale while text input is active. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src')
-rw-r--r--src/platform/wayland/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/platform/wayland/buffer.c b/src/platform/wayland/buffer.c
index b68621d..e465462 100644
--- a/src/platform/wayland/buffer.c
+++ b/src/platform/wayland/buffer.c
@@ -215,6 +215,9 @@ int apply_pending_geometry(struct wayland_surface *w)
w->base.scale_120 = w->scale_120;
w->logical_width = logical_w;
w->logical_height = logical_h;
+ /* The caret's logical rectangle depends on the scale. Send it again. */
+ if (rescaled && w->base.text_input_active)
+ wayland_surface_update_text_input(w);
#if YASL_HAS_EGL
if (w->egl_window && (resized || rescaled))
wl_egl_window_resize(w->egl_window, width, height, 0, 0);