[PATCHv2] text-input: Add v3 of the text-input protocol

Silvan Jegen s.jegen at gmail.com
Fri Apr 13 07:44:33 UTC 2018


On Thu, Apr 12, 2018 at 9:53 PM, Dorota Czaplejewicz
<dorota.czaplejewicz at puri.sm> wrote:
> On Thu, 12 Apr 2018 21:26:08 +0200
> Silvan Jegen <s.jegen at gmail.com> wrote:
>
>> Hi Dorota
>>
>> On Wed, Apr 11, 2018 at 03:03:58PM +0200, Dorota Czaplejewicz wrote:
>> > This new protocol description is a simplification over v2.
>> >
>> > - All pre-edit text styling is gone.
>> > - No events regarding input panel (OSK) state nor covered rectangle.
>> >   Compositors are still free to handle situations where the keyboard
>> >   focus rectangle is covered by the input panel.
>> > - No set_preferred_language request for clients.
>> > - There is no event to send keysyms. Compositors can use wl_keyboard
>> >   interface instead.
>> >
>> > Reviewed-by: Drew DeVault <sir at cmpwn.com>
>> > ---
>> >
>> > Hi,
>> >
>> > This patch follows the original proposal by Carlos Garnacho. It's the
>> > result of my work on behalf of Purism to get good on-screen keyboard
>> > support in Wayland. It incorporates changes coming from discussions
>> > with Sway/wlroots developers [0], as well as issues pointed out in
>> > response to the original proposal.
>> >
>> > Changes over the original:
>> > - typos, whitespace and naming as pointed out by Silvan Jegen
>> > - an explicit description of what happens to state: it's conceptually
>> >   double-buffered, and is not altered between focus events
>> > - removed the serial number on enter/leave events, as it's unambiguous
>> >   which surface has focus
>> >
>> > This protocol has already been implemented: in wlroots [0], rootston
>> > [1], and GTK3 [2]. We're counting on more projects to upstream support
>> > in order to settle on a single protocol for text input in the long
>> > term. Help and feedback appreciated!
>> >
>> > Cheers,
>> > Dorota Czaplejewicz
>> >
>> > PS. Sorry about the misformatted email on Monday.
>> >
>> > [0] https://github.com/swaywm/wlroots/pull/776
>> > [1] https://code.puri.sm/dorota.czaplejewicz/gtk
>> > [2] https://code.puri.sm/dorota.czaplejewicz/wlroots/src/text_input_test
>>
>> The last two references seem to be switched.
>>
>> I also might be dense but when I am trying to build the text_input_test
>> branch of your wlroots repo I get the following error because of a
>> missing text_input.h header file:
>>
>> [41/132] Compiling C object 'rootston/rootston at exe/main.c.o'.
>> FAILED: rootston/rootston at exe/main.c.o
>> cc  -Irootston/rootston at exe -Irootston -I../rootston -Iinclude -I../include -I/usr/include/libdrm -I/usr/include/libevdev-1.0/ -I/usr/include/libwacom-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/home/silvan/builds/wlroots-dorota/build -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -Wno-unused-parameter '-DWLR_SRC_DIR="/home/silvan/builds/wlroots-dorota"' -DWL_HIDE_DEPRECATED -MD -MQ 'rootston/rootston at exe/main.c.o' -MF 'rootston/rootston at exe/main.c.o.d' -o 'rootston/rootston at exe/main.c.o' -c ../rootston/main.c
>> In file included from ../include/rootston/cursor.h:4:0,
>>                  from ../include/rootston/input.h:9,
>>                  from ../include/rootston/server.h:15,
>>                  from ../rootston/main.c:13:
>> ../include/rootston/seat.h:7:10: fatal error: rootston/text_input.h: No such file or directory
>>  #include "rootston/text_input.h"
>>           ^~~~~~~~~~~~~~~~~~~~~~~
>> compilation terminated.
>> [42/132] Compiling C object 'rootston/rootston at exe/output.c.o'.
>> FAILED: rootston/rootston at exe/output.c.o
>> cc  -Irootston/rootston at exe -Irootston -I../rootston -Iinclude -I../include -I/usr/include/libdrm -I/usr/include/libevdev-1.0/ -I/usr/include/libwacom-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/home/silvan/builds/wlroots-dorota/build -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -Wno-unused-parameter '-DWLR_SRC_DIR="/home/silvan/builds/wlroots-dorota"' -DWL_HIDE_DEPRECATED -MD -MQ 'rootston/rootston at exe/output.c.o' -MF 'rootston/rootston at exe/output.c.o.d' -o 'rootston/rootston at exe/output.c.o' -c ../rootston/output.c
>> In file included from ../include/rootston/cursor.h:4:0,
>>                  from ../include/rootston/input.h:9,
>>                  from ../include/rootston/server.h:15,
>>                  from ../rootston/output.c:18:
>> ../include/rootston/seat.h:7:10: fatal error: rootston/text_input.h: No such file or directory
>>  #include "rootston/text_input.h"
>>
>> ... etc.
>>
>> Am I supposed to generate that file myself somehow?
>>
>>
>> Cheers,
>>
>> Silvan
>
> Hi Silvan,
>
> thank you for noticing, I apparently didn't check in that file. That has been hopefully fixed - I recreated and pushed it to the repository.

Awesome! I will test the code as soon as I find the time (most likely tomorrow).


> Sorry about the silly mistake.

No problem! I have done the same too many times at work...


Cheers,

Silvan


More information about the wayland-devel mailing list