Re: [PATCH wayland-protocols] input-method: Add zwp-input-method-v2
Hi Roman, I've been shown your KWin work last week - thanks for picking it up! The tested parts of input_method_v2 are the parts which text-input-v3 is using [0]. There's an application [1] and a compositor [0] with examples [2,3] that you can use for verifying the KWin implementation. I think they are well-tested, but that may just mean I haven't seen 80% of the problems. The untested-in-practice parts are about popups and keyboard grabs. I hope this can help you. Cheers, Dorota Czaplejewicz [0] https://github.com/swaywm/wlroots/pull/1203 [1] https://source.puri.sm/Librem5/virtboard [2] https://github.com/swaywm/wlroots/blob/master/examples/input-method.c [3] https://github.com/swaywm/wlroots/blob/master/examples/text-input.c On Fri, 9 Nov 2018 18:26:18 +0100 Roman Gilg wrote: > Hi, > > what's the current state of this patch? > > I have a KWin patch up for review to implement the text-input v3 > protocol, so I would be interested in pushing forward the input_method > v2 here. > > If there are already some test applications speaking both ends of the > pipeline I could try it out in KWin. > > Cheers > On Thu, Oct 4, 2018 at 10:01 PM Dorota Czaplejewicz > wrote: > > > > This protocol is based on v1, current text-input-v3, and wl_keyboard > > version 6. > > > > The pieces passing data relevant to the application on the other side of > > the compositor are a mirror copy of text-input-v3 events and requests. > > > > Compared to input-method-v1: > > - assumes that once preedit is displayed, no selection can be active, > > removing some selection handling > > - follow text-input and removes language indicators > > - explicitly attaches to seats > > - removes "commit" text which would replace the preedit string > > automatically in case it wasn't "confirmed" (whatever it means) > > - adds double-buffering in the same places as text-input-v3 > > - drops input_method_context and places its functionality directly in > > input_method > > - removes the ability to move the cursor position outside of preedit. It > > still allows to delete a larger chunk of text and replace it with a preedit > > - doesn't allow for sending of keyboard events to the compositor > > - doesn't define any surfaces except for a special compositor-positioned > > popup > > --- > > Hi, > > > > continuing the RFC, I think this protocol is actually workable now, and I'm > > sending this with the PATCH qualifier. > > > > The practical verification came in the form of a partial wlroots > > implementation [0]. The formal issues (chiefly stemming from copy-pasting > > things at night) have been pointed out to me by Simon, and corrected. > > > > The major unverified parts are keyboard grabs and popup surfaces, which I > > will verify next. > > > > Changes compared to the RFC: > > > > - fixed so many confusing typos > > - renamed preedit_text request to set_preedit_text > > - described what happens when things get destroyed > > - defined the role of input_popup sorface and forbade it from being deleted > > - copied wl_keyboard to serve as the keyboard grab interface > > > > I hope you can help me find the remaining issues and turn this interface > > into reality! > > > > Cheers, > > Dorota Czaplejewicz > > > > Makefile.am| 1 + > > unstable/input-method/input-method-unstable-v2.xml | 490 > > + > > 2 files changed, 491 insertions(+) > > create mode 100644 unstable/input-method/input-method-unstable-v2.xml > > > > diff --git a/Makefile.am b/Makefile.am > > index 6394e26..f3b9f80 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -7,6 +7,7 @@ unstable_protocols = > > \ > > unstable/text-input/text-input-unstable-v1.xml > > \ > > unstable/text-input/text-input-unstable-v3.xml > > \ > > unstable/input-method/input-method-unstable-v1.xml > > \ > > + unstable/input-method/input-method-unstable-v2.xml > > \ > > unstable/xdg-shell/xdg-shell-unstable-v5.xml > > \ > > unstable/xdg-shell/xdg-shell-unstable-v6.xml > > \ > > unstable/relative-pointer/relative-pointer-unstable-v1.xml > > \ > > diff --git a/unstable/input-method/input-method-unstable-v2.xml > > b/unstable/input-method/input-method-unstable-v2.xml > > new file mode 100644 > > index 000..62be9d9 > > --- /dev/null > > +++ b/unstable/input-method/input-method-unstable-v2.xml > > @@ -0,0 +1,490 @@ > > + > > + > > + > > + > > +Copyright © 2008-2011 Kristian Høgsberg > > +Copyright © 2010-2011 Intel Corporation > > +Copyright © 2012-2013 Collabora, Ltd. > > +Copyright © 2012, 2013 Intel Corporation > > +Copyright © 2015, 2016 Jan Arne Petersen > > +Copyright © 2017, 2018 Red Hat, Inc. > > +Copyright ©
Re: [PATCH wayland-protocols] input-method: Add zwp-input-method-v2
Hi, what's the current state of this patch? I have a KWin patch up for review to implement the text-input v3 protocol, so I would be interested in pushing forward the input_method v2 here. If there are already some test applications speaking both ends of the pipeline I could try it out in KWin. Cheers On Thu, Oct 4, 2018 at 10:01 PM Dorota Czaplejewicz wrote: > > This protocol is based on v1, current text-input-v3, and wl_keyboard version > 6. > > The pieces passing data relevant to the application on the other side of the > compositor are a mirror copy of text-input-v3 events and requests. > > Compared to input-method-v1: > - assumes that once preedit is displayed, no selection can be active, > removing some selection handling > - follow text-input and removes language indicators > - explicitly attaches to seats > - removes "commit" text which would replace the preedit string automatically > in case it wasn't "confirmed" (whatever it means) > - adds double-buffering in the same places as text-input-v3 > - drops input_method_context and places its functionality directly in > input_method > - removes the ability to move the cursor position outside of preedit. It > still allows to delete a larger chunk of text and replace it with a preedit > - doesn't allow for sending of keyboard events to the compositor > - doesn't define any surfaces except for a special compositor-positioned popup > --- > Hi, > > continuing the RFC, I think this protocol is actually workable now, and I'm > sending this with the PATCH qualifier. > > The practical verification came in the form of a partial wlroots > implementation [0]. The formal issues (chiefly stemming from copy-pasting > things at night) have been pointed out to me by Simon, and corrected. > > The major unverified parts are keyboard grabs and popup surfaces, which I > will verify next. > > Changes compared to the RFC: > > - fixed so many confusing typos > - renamed preedit_text request to set_preedit_text > - described what happens when things get destroyed > - defined the role of input_popup sorface and forbade it from being deleted > - copied wl_keyboard to serve as the keyboard grab interface > > I hope you can help me find the remaining issues and turn this interface into > reality! > > Cheers, > Dorota Czaplejewicz > > Makefile.am| 1 + > unstable/input-method/input-method-unstable-v2.xml | 490 > + > 2 files changed, 491 insertions(+) > create mode 100644 unstable/input-method/input-method-unstable-v2.xml > > diff --git a/Makefile.am b/Makefile.am > index 6394e26..f3b9f80 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -7,6 +7,7 @@ unstable_protocols = > \ > unstable/text-input/text-input-unstable-v1.xml > \ > unstable/text-input/text-input-unstable-v3.xml > \ > unstable/input-method/input-method-unstable-v1.xml > \ > + unstable/input-method/input-method-unstable-v2.xml > \ > unstable/xdg-shell/xdg-shell-unstable-v5.xml > \ > unstable/xdg-shell/xdg-shell-unstable-v6.xml > \ > unstable/relative-pointer/relative-pointer-unstable-v1.xml > \ > diff --git a/unstable/input-method/input-method-unstable-v2.xml > b/unstable/input-method/input-method-unstable-v2.xml > new file mode 100644 > index 000..62be9d9 > --- /dev/null > +++ b/unstable/input-method/input-method-unstable-v2.xml > @@ -0,0 +1,490 @@ > + > + > + > + > +Copyright © 2008-2011 Kristian Høgsberg > +Copyright © 2010-2011 Intel Corporation > +Copyright © 2012-2013 Collabora, Ltd. > +Copyright © 2012, 2013 Intel Corporation > +Copyright © 2015, 2016 Jan Arne Petersen > +Copyright © 2017, 2018 Red Hat, Inc. > +Copyright © 2018 Purism SPC > + > +Permission is hereby granted, free of charge, to any person obtaining a > +copy of this software and associated documentation files (the > "Software"), > +to deal in the Software without restriction, including without limitation > +the rights to use, copy, modify, merge, publish, distribute, sublicense, > +and/or sell copies of the Software, and to permit persons to whom the > +Software is furnished to do so, subject to the following conditions: > + > +The above copyright notice and this permission notice (including the next > +paragraph) shall be included in all copies or substantial portions of the > +Software. > + > +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS > OR > +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR >
[PATCH wayland-protocols] input-method: Add zwp-input-method-v2
This protocol is based on v1, current text-input-v3, and wl_keyboard version 6. The pieces passing data relevant to the application on the other side of the compositor are a mirror copy of text-input-v3 events and requests. Compared to input-method-v1: - assumes that once preedit is displayed, no selection can be active, removing some selection handling - follow text-input and removes language indicators - explicitly attaches to seats - removes "commit" text which would replace the preedit string automatically in case it wasn't "confirmed" (whatever it means) - adds double-buffering in the same places as text-input-v3 - drops input_method_context and places its functionality directly in input_method - removes the ability to move the cursor position outside of preedit. It still allows to delete a larger chunk of text and replace it with a preedit - doesn't allow for sending of keyboard events to the compositor - doesn't define any surfaces except for a special compositor-positioned popup --- Hi, continuing the RFC, I think this protocol is actually workable now, and I'm sending this with the PATCH qualifier. The practical verification came in the form of a partial wlroots implementation [0]. The formal issues (chiefly stemming from copy-pasting things at night) have been pointed out to me by Simon, and corrected. The major unverified parts are keyboard grabs and popup surfaces, which I will verify next. Changes compared to the RFC: - fixed so many confusing typos - renamed preedit_text request to set_preedit_text - described what happens when things get destroyed - defined the role of input_popup sorface and forbade it from being deleted - copied wl_keyboard to serve as the keyboard grab interface I hope you can help me find the remaining issues and turn this interface into reality! Cheers, Dorota Czaplejewicz Makefile.am| 1 + unstable/input-method/input-method-unstable-v2.xml | 490 + 2 files changed, 491 insertions(+) create mode 100644 unstable/input-method/input-method-unstable-v2.xml diff --git a/Makefile.am b/Makefile.am index 6394e26..f3b9f80 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,6 +7,7 @@ unstable_protocols = \ unstable/text-input/text-input-unstable-v1.xml \ unstable/text-input/text-input-unstable-v3.xml \ unstable/input-method/input-method-unstable-v1.xml \ + unstable/input-method/input-method-unstable-v2.xml \ unstable/xdg-shell/xdg-shell-unstable-v5.xml \ unstable/xdg-shell/xdg-shell-unstable-v6.xml \ unstable/relative-pointer/relative-pointer-unstable-v1.xml \ diff --git a/unstable/input-method/input-method-unstable-v2.xml b/unstable/input-method/input-method-unstable-v2.xml new file mode 100644 index 000..62be9d9 --- /dev/null +++ b/unstable/input-method/input-method-unstable-v2.xml @@ -0,0 +1,490 @@ + + + + +Copyright © 2008-2011 Kristian Høgsberg +Copyright © 2010-2011 Intel Corporation +Copyright © 2012-2013 Collabora, Ltd. +Copyright © 2012, 2013 Intel Corporation +Copyright © 2015, 2016 Jan Arne Petersen +Copyright © 2017, 2018 Red Hat, Inc. +Copyright © 2018 Purism SPC + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + + +This protocol allows applications to act as input methods for compositors. + +An input method context is used to manage the state of the input method. + +Text strings are UTF-8 encoded, their indices and lengths are in bytes. + +This document adheres to the RFC 2119 when using words like "must", +"should", "may", etc. + +Warning! The protocol described in this