From 758be9836c4fe1292f04641a8e166c83cf6400fd Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Fri, 19 Mar 2021 14:14:37 -0600 Subject: [PATCH 1/2] text-input: Synchronize set_cursor_rectangle with the wl_surface Signed-off-by: Tadeo Kondrak --- unstable/text-input/text-input-unstable-v3.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index c1c1b22..a6db8f8 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -47,7 +47,7 @@ interface version number is reset. - + The zwp_text_input_v3 interface represents text input and input methods associated with a seat. It provides enter/leave events to follow the @@ -273,6 +273,16 @@ the text input does not support describing the cursor area. If the empty values get applied, subsequent attempts to change them may have no effect. + + As of version 2, the values sent with this request are not used + immediately after they are applied to the text-input state. + + After the pending state is applied with the zwp_text_input_v3.commit + request, the following wl_surface.commit request on the surface with + text-input focus will cause the values to become active. + + If the surface with text-input focus changes before a wl_surface.commit + request is sent, the values are discarded. @@ -434,7 +444,7 @@ - + A factory for text-input objects. This object is a global singleton. From 0b73773da455ff89bfda346c6bd363e399328c56 Mon Sep 17 00:00:00 2001 From: dcz Date: Fri, 20 Jun 2025 11:34:28 +0000 Subject: [PATCH 2/2] text-input: Reword and clarify cursor syncing This change makes it clear that there's an extra buffer for the value. This explains the purpose of the complicated design. Signed-off-by: Dorota Czaplejewicz --- unstable/text-input/text-input-unstable-v3.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index a6db8f8..d3727f5 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -274,15 +274,17 @@ empty values get applied, subsequent attempts to change them may have no effect. - As of version 2, the values sent with this request are not used - immediately after they are applied to the text-input state. + As of version 2, the zwp_text_input_v3.commit request does not apply + values sent with this request. Instead, it stores them in a separate "committed" area. + The committed values, if still valid, get applied on the next + wl_surface.commit request on the surface with text-input focus. + Both committed and applied values get invalidated on: + - the next committed enable or disable request, or + - a change of the focused surface of the text-input (leave or enter events). - After the pending state is applied with the zwp_text_input_v3.commit - request, the following wl_surface.commit request on the surface with - text-input focus will cause the values to become active. - - If the surface with text-input focus changes before a wl_surface.commit - request is sent, the values are discarded. + This double stage application allows the compositor to position + uhe input method popup in the same frame as the contents + of the text on the surface are updated.