Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On Wed, Oct 12, 2016 at 03:50:33PM -0700, Bryce Harrington wrote: > On Wed, Jul 06, 2016 at 12:26:28AM +0200, Jan Arne Petersen wrote: > > On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnachowrote: > > > > Hi Carlos, > > > > Thanks for the feedback. > > > > > > > > Chiming in, and kinda late at that... hopefully we'll get this moving :). > > > > I do not think we want to change text_input_unstable_v2 version 1 anymore > > (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry for that. > > But I already started to work on text_input_unstable_v2 version 2 and also > > text_input_unstable_v3 where I like to include the feedback. > > > > > First of all, I'm aware that some of my comments are directed towards > > > stuff that's unchanged between v1 and v2, so please bear with me, I > > > hope the feedback is useful. > > > > Sure that is perfectly fine, I think that is the idea of the unstable > > protocols > > anyways that we can still change everything and adapt them with real > > world experience. > > > > On Mon, May 30, 2016 at 11:41 AM, Jan Arne Petersen > > > wrote: > > > > There were some shortcomings in the first version of the protocol which > > > > makes it not really useful in real world applications. It is not really > > > > possible to fix them in a compatible way so introduce a new v2 of the > > > > protocol. > > > > > > > > Fixes some shortcomings of the first version: > > > > > > > > * Use only one wp_text_input per wl_seat (client side should be > > > > handled by client toolkit) > > > > * Allow focus tracking without wl_keyboard present > > > > * Improve update state handling and better define state handling > > I'd love to see a re-rev of this patch. Looking at a diff between v1 > and v2, those three changes seem quite suitable, although I'd like to > see an exact minimal diff of the changes so holding off on detailed > review. But worth an acked by at least: I share this sentiment! > > Acked-by: Bryce Harrington > > The input-method and text-input protocols both deal with similar > functionality (text input). I'm not sure if we already have a high > level description somewhere that describes their relationship, but at a > minimum I think the protocols ought to cross-reference each other. (For > instance, something like, "See also the input-method protocol, which > provides ...") When I first looked at the two protocols, just reading > their descriptions it wasn't obvious at all how they related; it only > clicked after studying the weston code. I spent quite a long time looking at those protocols and their client/compositor implementations (in Weston as well as in QTWayland). By now I think I have at least a basic understanding of how they should work together. I was wondering where a high-level documentation describing how text input is handled (with the help of an input method) should live. Since those are unstable protocols, maybe adding an .md file somewhere in wayland-protocols/unstable/ would be appropriate? I have one question regarding the following request (I hope this is the right place to ask): > > > Sets the cursor outline as a x, y, width, height rectangle in surface > local coordinates. > > Allows the compositor to put a window with word suggestions near the > cursor. > > > > > > I assume that the "window with word suggestions" that this request enables the compositor to draw will be supplied by the input method (though the current version of the input-method protocol does not seem to provide an event/request for this yet). Is this assumption correct? Cheers, Silvan ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
Hi, On Wed, 2016-10-12 at 15:50 -0700, Bryce Harrington wrote: > On Wed, Jul 06, 2016 at 12:26:28AM +0200, Jan Arne Petersen wrote: > > > > On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnacho> > wrote: > > > > Hi Carlos, > > > > Thanks for the feedback. > > > > > > > > > > > Chiming in, and kinda late at that... hopefully we'll get this > > > moving :). > > > > I do not think we want to change text_input_unstable_v2 version 1 > > anymore > > (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry > > for that. > > But I already started to work on text_input_unstable_v2 version 2 > > and also > > text_input_unstable_v3 where I like to include the feedback. > > > > > > > > First of all, I'm aware that some of my comments are directed > > > towards > > > stuff that's unchanged between v1 and v2, so please bear with me, > > > I > > > hope the feedback is useful. > > > > Sure that is perfectly fine, I think that is the idea of the > > unstable protocols > > anyways that we can still change everything and adapt them with > > real > > world experience. > > > > > > > > > On Mon, May 30, 2016 at 11:41 AM, Jan Arne Petersen > > l.com> wrote: > > > > > > > > There were some shortcomings in the first version of the > > > > protocol which > > > > makes it not really useful in real world applications. It is > > > > not really > > > > possible to fix them in a compatible way so introduce a new v2 > > > > of the > > > > protocol. > > > > > > > > Fixes some shortcomings of the first version: > > > > > > > > * Use only one wp_text_input per wl_seat (client side should be > > > > handled by client toolkit) > > > > * Allow focus tracking without wl_keyboard present > > > > * Improve update state handling and better define state > > > > handling > > I'd love to see a re-rev of this patch. Looking at a diff between v1 > and v2, those three changes seem quite suitable, although I'd like to > see an exact minimal diff of the changes so holding off on detailed > review. But worth an acked by at least: > > Acked-by: Bryce Harrington Yes I am working on a new patch. Next time I will also add a diff between the both protocols so it is easier to review. > The input-method and text-input protocols both deal with similar > functionality (text input). I'm not sure if we already have a high > level description somewhere that describes their relationship, but at > a minimum I think the protocols ought to cross-reference each > other. (For > instance, something like, "See also the input-method protocol, which > provides ...") When I first looked at the two protocols, just > reading > their descriptions it wasn't obvious at all how they related; it only > clicked after studying the weston code. Yes that makes sense. I guess we can also update the input-method protocol together with the text-input protocol to make it easier to update the implementation of both protocols in weston. Regards Jan Arne ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On Wed, Jul 06, 2016 at 12:26:28AM +0200, Jan Arne Petersen wrote: > On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnachowrote: > > Hi Carlos, > > Thanks for the feedback. > > > > > Chiming in, and kinda late at that... hopefully we'll get this moving :). > > I do not think we want to change text_input_unstable_v2 version 1 anymore > (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry for that. > But I already started to work on text_input_unstable_v2 version 2 and also > text_input_unstable_v3 where I like to include the feedback. > > > First of all, I'm aware that some of my comments are directed towards > > stuff that's unchanged between v1 and v2, so please bear with me, I > > hope the feedback is useful. > > Sure that is perfectly fine, I think that is the idea of the unstable > protocols > anyways that we can still change everything and adapt them with real > world experience. > > On Mon, May 30, 2016 at 11:41 AM, Jan Arne Petersen > > wrote: > > > There were some shortcomings in the first version of the protocol which > > > makes it not really useful in real world applications. It is not really > > > possible to fix them in a compatible way so introduce a new v2 of the > > > protocol. > > > > > > Fixes some shortcomings of the first version: > > > > > > * Use only one wp_text_input per wl_seat (client side should be > > > handled by client toolkit) > > > * Allow focus tracking without wl_keyboard present > > > * Improve update state handling and better define state handling I'd love to see a re-rev of this patch. Looking at a diff between v1 and v2, those three changes seem quite suitable, although I'd like to see an exact minimal diff of the changes so holding off on detailed review. But worth an acked by at least: Acked-by: Bryce Harrington The input-method and text-input protocols both deal with similar functionality (text input). I'm not sure if we already have a high level description somewhere that describes their relationship, but at a minimum I think the protocols ought to cross-reference each other. (For instance, something like, "See also the input-method protocol, which provides ...") When I first looked at the two protocols, just reading their descriptions it wasn't obvious at all how they related; it only clicked after studying the weston code. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On Wed, Jul 6, 2016, 01:44 Jonas Ådahlwrote: > On Wed, Jul 06, 2016 at 12:26:28AM +0200, Jan Arne Petersen wrote: > > On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnacho > wrote: > > > > Hi Carlos, > > > > Thanks for the feedback. > > > > > > > > Chiming in, and kinda late at that... hopefully we'll get this moving > :). > > > > I do not think we want to change text_input_unstable_v2 version 1 anymore > > (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry for > that. > > But I already started to work on text_input_unstable_v2 version 2 and > also > > text_input_unstable_v3 where I like to include the feedback. > > If you have already shipped text_input_unstable_v2 in QT without using a > private prefix, we must simply skip text_input_unstable_v2 in > wayland-protocols and move to v3 already, not ever relaesing the > unstable v2. > > Next time that you cannot wait for a protocol being released as part of > wayland-protocols, please use a private prefix. If you just release > software with the unreleased protocol with the generic prefix used by > wayland-protocols, you completely side step the intention of > wayland-protocols, forcing us to skip versions or rename interfaces. > Yes, sorry as I said it was my fault. I assumed we would get it released in wayland-protocols in time. Regards Jan Arne > ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On Wed, Jul 06, 2016 at 12:26:28AM +0200, Jan Arne Petersen wrote: > On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnachowrote: > > Hi Carlos, > > Thanks for the feedback. > > > > > Chiming in, and kinda late at that... hopefully we'll get this moving :). > > I do not think we want to change text_input_unstable_v2 version 1 anymore > (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry for that. > But I already started to work on text_input_unstable_v2 version 2 and also > text_input_unstable_v3 where I like to include the feedback. If you have already shipped text_input_unstable_v2 in QT without using a private prefix, we must simply skip text_input_unstable_v2 in wayland-protocols and move to v3 already, not ever relaesing the unstable v2. Next time that you cannot wait for a protocol being released as part of wayland-protocols, please use a private prefix. If you just release software with the unreleased protocol with the generic prefix used by wayland-protocols, you completely side step the intention of wayland-protocols, forcing us to skip versions or rename interfaces. Jonas ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnachowrote: Hi Carlos, Thanks for the feedback. > > Chiming in, and kinda late at that... hopefully we'll get this moving :). I do not think we want to change text_input_unstable_v2 version 1 anymore (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry for that. But I already started to work on text_input_unstable_v2 version 2 and also text_input_unstable_v3 where I like to include the feedback. > First of all, I'm aware that some of my comments are directed towards > stuff that's unchanged between v1 and v2, so please bear with me, I > hope the feedback is useful. Sure that is perfectly fine, I think that is the idea of the unstable protocols anyways that we can still change everything and adapt them with real world experience. > > On Mon, May 30, 2016 at 11:41 AM, Jan Arne Petersen wrote: > > There were some shortcomings in the first version of the protocol which > > makes it not really useful in real world applications. It is not really > > possible to fix them in a compatible way so introduce a new v2 of the > > protocol. > > > > Fixes some shortcomings of the first version: > > > > * Use only one wp_text_input per wl_seat (client side should be > > handled by client toolkit) > > * Allow focus tracking without wl_keyboard present > > * Improve update state handling and better define state handling > > --- > > Changes to v6: > > * Fix some typos > > > > Makefile.am| 1 + > > unstable/text-input/text-input-unstable-v2.xml | 480 > > + > > 2 files changed, 481 insertions(+) > > create mode 100644 unstable/text-input/text-input-unstable-v2.xml > > > > diff --git a/Makefile.am b/Makefile.am > > index 71d2632..cc8d531 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -3,6 +3,7 @@ unstable_protocols = > > \ > > unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml > > \ > > unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > > \ > > unstable/text-input/text-input-unstable-v1.xml > > \ > > + unstable/text-input/text-input-unstable-v2.xml > > \ > > unstable/input-method/input-method-unstable-v1.xml > > \ > > unstable/xdg-shell/xdg-shell-unstable-v5.xml > > \ > > unstable/relative-pointer/relative-pointer-unstable-v1.xml > > \ > > diff --git a/unstable/text-input/text-input-unstable-v2.xml > > b/unstable/text-input/text-input-unstable-v2.xml > > new file mode 100644 > > index 000..ea35d9b > > --- /dev/null > > +++ b/unstable/text-input/text-input-unstable-v2.xml > > @@ -0,0 +1,480 @@ > > + > > + > > + > > + > > +Copyright © 2012, 2013 Intel Corporation > > +Copyright © 2015, 2016 Jan Arne Petersen > > + > > +Permission to use, copy, modify, distribute, and sell this > > +software and its documentation for any purpose is hereby granted > > +without fee, provided that the above copyright notice appear in > > +all copies and that both that copyright notice and this permission > > +notice appear in supporting documentation, and that the name of > > +the copyright holders not be used in advertising or publicity > > +pertaining to distribution of the software without specific, > > +written prior permission. The copyright holders make no > > +representations about the suitability of this software for any > > +purpose. It is provided "as is" without express or implied > > +warranty. > > + > > +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS > > +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND > > +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY > > +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > > +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN > > +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > > +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF > > +THIS SOFTWARE. > > + > > + > > + > > + > > + The zwp_text_input_v2 interface represents text input and input > > methods > > + associated with a seat. It provides enter/leave events to follow the > > + text input focus for a seat. > > + > > + Requests are used to enable/disable the text-input object and set > > + state information like surrounding and selected text or the content > > type. > > + The information about the entered text is sent to the text-input > > object > > + via the pre-edit and commit events. Using this interface removes the > > need > > + for applications to directly process hardware key events and compose > > text > > + out of them. > > + > > +
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
Hi Jan Arne!, Chiming in, and kinda late at that... hopefully we'll get this moving :). First of all, I'm aware that some of my comments are directed towards stuff that's unchanged between v1 and v2, so please bear with me, I hope the feedback is useful. On Mon, May 30, 2016 at 11:41 AM, Jan Arne Petersenwrote: > There were some shortcomings in the first version of the protocol which > makes it not really useful in real world applications. It is not really > possible to fix them in a compatible way so introduce a new v2 of the > protocol. > > Fixes some shortcomings of the first version: > > * Use only one wp_text_input per wl_seat (client side should be > handled by client toolkit) > * Allow focus tracking without wl_keyboard present > * Improve update state handling and better define state handling > --- > Changes to v6: > * Fix some typos > > Makefile.am| 1 + > unstable/text-input/text-input-unstable-v2.xml | 480 > + > 2 files changed, 481 insertions(+) > create mode 100644 unstable/text-input/text-input-unstable-v2.xml > > diff --git a/Makefile.am b/Makefile.am > index 71d2632..cc8d531 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -3,6 +3,7 @@ unstable_protocols = > \ > unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml > \ > unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > \ > unstable/text-input/text-input-unstable-v1.xml > \ > + unstable/text-input/text-input-unstable-v2.xml > \ > unstable/input-method/input-method-unstable-v1.xml > \ > unstable/xdg-shell/xdg-shell-unstable-v5.xml > \ > unstable/relative-pointer/relative-pointer-unstable-v1.xml > \ > diff --git a/unstable/text-input/text-input-unstable-v2.xml > b/unstable/text-input/text-input-unstable-v2.xml > new file mode 100644 > index 000..ea35d9b > --- /dev/null > +++ b/unstable/text-input/text-input-unstable-v2.xml > @@ -0,0 +1,480 @@ > + > + > + > + > +Copyright © 2012, 2013 Intel Corporation > +Copyright © 2015, 2016 Jan Arne Petersen > + > +Permission to use, copy, modify, distribute, and sell this > +software and its documentation for any purpose is hereby granted > +without fee, provided that the above copyright notice appear in > +all copies and that both that copyright notice and this permission > +notice appear in supporting documentation, and that the name of > +the copyright holders not be used in advertising or publicity > +pertaining to distribution of the software without specific, > +written prior permission. The copyright holders make no > +representations about the suitability of this software for any > +purpose. It is provided "as is" without express or implied > +warranty. > + > +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS > +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND > +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY > +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN > +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF > +THIS SOFTWARE. > + > + > + > + > + The zwp_text_input_v2 interface represents text input and input methods > + associated with a seat. It provides enter/leave events to follow the > + text input focus for a seat. > + > + Requests are used to enable/disable the text-input object and set > + state information like surrounding and selected text or the content > type. > + The information about the entered text is sent to the text-input object > + via the pre-edit and commit events. Using this interface removes the > need > + for applications to directly process hardware key events and compose > text > + out of them. > + > + Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices > + have to always point to the first byte of an UTF-8 encoded code point. > + Lengths are not allowed to contain just a part of an UTF-8 encoded code > + point. > + > + State is sent by the state requests (set_surrounding_text, > + set_content_type, set_cursor_rectangle and set_preferred_language) and > + an update_state request. After an enter or an input_method_change event > + all state information is invalidated and needs to be resent from the > + client. A reset or entering a new widget on client side also > + invalidates all current state information. > + > + > + > + > + Destroy the wp_text_input object. Also
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On May 30, 2016, at 4:41 AM, Jan Arne Petersenwrote: > > There were some shortcomings in the first version of the protocol which > makes it not really useful in real world applications. It is not really > possible to fix them in a compatible way so introduce a new v2 of the > protocol. > > Fixes some shortcomings of the first version: > > * Use only one wp_text_input per wl_seat (client side should be > handled by client toolkit) > * Allow focus tracking without wl_keyboard present > * Improve update state handling and better define state handling > --- > Changes to v6: > * Fix some typos Hi Jan, There are some minor nits I'll address w/ a follow up patch, but this is Reviewed-by: Yong Bakos (Note: careful of what you manually put below the ---, this breaks the format of the patch.) yong > Makefile.am| 1 + > unstable/text-input/text-input-unstable-v2.xml | 480 + > 2 files changed, 481 insertions(+) > create mode 100644 unstable/text-input/text-input-unstable-v2.xml > > diff --git a/Makefile.am b/Makefile.am > index 71d2632..cc8d531 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -3,6 +3,7 @@ unstable_protocols = > \ > unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml > \ > unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > \ > unstable/text-input/text-input-unstable-v1.xml > \ > + unstable/text-input/text-input-unstable-v2.xml > \ > unstable/input-method/input-method-unstable-v1.xml > \ > unstable/xdg-shell/xdg-shell-unstable-v5.xml > \ > unstable/relative-pointer/relative-pointer-unstable-v1.xml > \ > diff --git a/unstable/text-input/text-input-unstable-v2.xml > b/unstable/text-input/text-input-unstable-v2.xml > new file mode 100644 > index 000..ea35d9b > --- /dev/null > +++ b/unstable/text-input/text-input-unstable-v2.xml > @@ -0,0 +1,480 @@ > + > + > + > + > +Copyright © 2012, 2013 Intel Corporation > +Copyright © 2015, 2016 Jan Arne Petersen > + > +Permission to use, copy, modify, distribute, and sell this > +software and its documentation for any purpose is hereby granted > +without fee, provided that the above copyright notice appear in > +all copies and that both that copyright notice and this permission > +notice appear in supporting documentation, and that the name of > +the copyright holders not be used in advertising or publicity > +pertaining to distribution of the software without specific, > +written prior permission. The copyright holders make no > +representations about the suitability of this software for any > +purpose. It is provided "as is" without express or implied > +warranty. > + > +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS > +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND > +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY > +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN > +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF > +THIS SOFTWARE. > + > + > + > + > + The zwp_text_input_v2 interface represents text input and input methods > + associated with a seat. It provides enter/leave events to follow the > + text input focus for a seat. > + > + Requests are used to enable/disable the text-input object and set > + state information like surrounding and selected text or the content > type. > + The information about the entered text is sent to the text-input object > + via the pre-edit and commit events. Using this interface removes the > need > + for applications to directly process hardware key events and compose > text > + out of them. > + > + Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices > + have to always point to the first byte of an UTF-8 encoded code point. > + Lengths are not allowed to contain just a part of an UTF-8 encoded code > + point. > + > + State is sent by the state requests (set_surrounding_text, > + set_content_type, set_cursor_rectangle and set_preferred_language) and > + an update_state request. After an enter or an input_method_change event > + all state information is invalidated and needs to be resent from the > + client. A reset or entering a new widget on client side also > + invalidates all current state information. > + > + > + > + > + Destroy the wp_text_input object. Also disables all surfaces enabled > + through this