Re: [RFC wayland-protocols] input-method: Add zwp-input-method-v2

2018-10-04 Thread Dorota Czaplejewicz
Thank you Simon for reading the proposal so carefully!

My replies are inline.

On Fri, 07 Sep 2018 11:54:36 +
Simon Ser  wrote:

> On 6 August 2018 3:00 PM, Dorota Czaplejewicz  
> wrote:
> > This protocol is based on v1, and current text-input-v3.
> >
> > 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,
> >
> > the third item on the path to well-supported virtual keyboard experience 
> > under
> > Wayland comes from Purism. This one allows the compositor to delegate text
> > input and composition duties to an application instead of handling it 
> > itself.
> > Input-method-delegating compositor would typically become only a broker
> > between the input method client and other applications.
> >
> > I took the existing input-method protocol, and after dissecting it with the
> > help of wlroots developers, I came up with an improved version, which is
> > attached for your (re)viewing pleasure.
> >
> > A large part of this protocol was taken from recent text-input-v3, and some
> > description text was improved. Still, the protocol has a couple of rough
> > edges, which is why it's titled RFC and not a patch.
> >
> > The issues I have had most trouble with are related to the handling of
> > keyboard grabs. These are meant to allow traditional, keyboard-based input
> > methods, to take over keyboard input in order to compose text in a different
> > way.
> >
> > First, keyboard grabs are defined as unreliable. I'm not sure whether this 
> > is
> > the right choice, but given that making them more reliable seems rather
> > complicated, this is the default one.
> >
> > In addition, handling the keyboard events themselves is troublesome, because
> > an input method, even if it has a surface, is not meant to have keyboard 
> > focus
> > while it's in operation. Returning wl_keyboard as new_id seems not to be
> > possible due to versioning. Should the request make an existing wl_keyboard
> > instance change behaviour? Or perhaps there should be a new
> > zwp_input_method_keyboard mimicking the wl_keyboard interface?
> >
> > I'm interested in your opinions.
> >
> > Thank you,
> > Dorota Czaplejewicz  
> 
> Thansk for your RFC!
> 
> >  Makefile.am|   1 +
> >  unstable/input-method/input-method-unstable-v2.xml | 403 
> > +
> >  2 files changed, 404 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..8cf8e29
> > --- /dev/null
> > +++ b/unstable/input-method/input-method-unstable-v2.xml
> > @@ -0,0 +1,403 @@
> > +
> > +
> > +
> > +  
> > +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 
> > 

Re: [RFC wayland-protocols] input-method: Add zwp-input-method-v2

2018-09-07 Thread Simon Ser
On 6 August 2018 3:00 PM, Dorota Czaplejewicz  
wrote:
> This protocol is based on v1, and current text-input-v3.
>
> 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,
>
> the third item on the path to well-supported virtual keyboard experience under
> Wayland comes from Purism. This one allows the compositor to delegate text
> input and composition duties to an application instead of handling it itself.
> Input-method-delegating compositor would typically become only a broker
> between the input method client and other applications.
>
> I took the existing input-method protocol, and after dissecting it with the
> help of wlroots developers, I came up with an improved version, which is
> attached for your (re)viewing pleasure.
>
> A large part of this protocol was taken from recent text-input-v3, and some
> description text was improved. Still, the protocol has a couple of rough
> edges, which is why it's titled RFC and not a patch.
>
> The issues I have had most trouble with are related to the handling of
> keyboard grabs. These are meant to allow traditional, keyboard-based input
> methods, to take over keyboard input in order to compose text in a different
> way.
>
> First, keyboard grabs are defined as unreliable. I'm not sure whether this is
> the right choice, but given that making them more reliable seems rather
> complicated, this is the default one.
>
> In addition, handling the keyboard events themselves is troublesome, because
> an input method, even if it has a surface, is not meant to have keyboard focus
> while it's in operation. Returning wl_keyboard as new_id seems not to be
> possible due to versioning. Should the request make an existing wl_keyboard
> instance change behaviour? Or perhaps there should be a new
> zwp_input_method_keyboard mimicking the wl_keyboard interface?
>
> I'm interested in your opinions.
>
> Thank you,
> Dorota Czaplejewicz

Thansk for your RFC!

>  Makefile.am|   1 +
>  unstable/input-method/input-method-unstable-v2.xml | 403 
> +
>  2 files changed, 404 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..8cf8e29
> --- /dev/null
> +++ b/unstable/input-method/input-method-unstable-v2.xml
> @@ -0,0 +1,403 @@
> +
> +
> +
> +  
> +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 

Re: [RFC wayland-protocols] input-method: Add zwp-input-method-v2

2018-08-07 Thread Silvan Jegen
Hi

Just some typos I found (for now):

On Mon, Aug 06, 2018 at 03:00:21PM +0200, Dorota Czaplejewicz wrote:
> This protocol is based on v1, and current text-input-v3.
> 
> 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,
> 
> the third item on the path to well-supported virtual keyboard experience 
> under Wayland comes from Purism. This one allows the compositor to delegate 
> text input and composition duties to an application instead of handling it 
> itself. Input-method-delegating compositor would typically become only a 
> broker between the input method client and other applications.
> 
> I took the existing input-method protocol, and after dissecting it with the 
> help of wlroots developers, I came up with an improved version, which is 
> attached for your (re)viewing pleasure.
> 
> A large part of this protocol was taken from recent text-input-v3, and some 
> description text was improved. Still, the protocol has a couple of rough 
> edges, which is why it's titled RFC and not a patch.
> 
> The issues I have had most trouble with are related to the handling of 
> keyboard grabs. These are meant to allow traditional, keyboard-based input 
> methods, to take over keyboard input in order to compose text in a different 
> way.
> 
> First, keyboard grabs are defined as unreliable. I'm not sure whether this is 
> the right choice, but given that making them more reliable seems rather 
> complicated, this is the default one.
> 
> In addition, handling the keyboard events themselves is troublesome, because 
> an input method, even if it has a surface, is not meant to have keyboard 
> focus while it's in operation. Returning wl_keyboard as new_id seems not to 
> be possible due to versioning. Should the request make an existing 
> wl_keyboard instance change behaviour? Or perhaps there should be a new 
> zwp_input_method_keyboard mimicking the wl_keyboard interface?
> 
> I'm interested in your opinions.
> 
> Thank you,
> Dorota Czaplejewicz 
> 
>  Makefile.am|   1 +
>  unstable/input-method/input-method-unstable-v2.xml | 403 
> +
>  2 files changed, 404 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..8cf8e29
> --- /dev/null
> +++ b/unstable/input-method/input-method-unstable-v2.xml
> @@ -0,0 +1,403 @@
> +
> +
> +
> +  
> +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 

[RFC wayland-protocols] input-method: Add zwp-input-method-v2

2018-08-06 Thread Dorota Czaplejewicz
This protocol is based on v1, and current text-input-v3.

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,

the third item on the path to well-supported virtual keyboard experience under 
Wayland comes from Purism. This one allows the compositor to delegate text 
input and composition duties to an application instead of handling it itself. 
Input-method-delegating compositor would typically become only a broker between 
the input method client and other applications.

I took the existing input-method protocol, and after dissecting it with the 
help of wlroots developers, I came up with an improved version, which is 
attached for your (re)viewing pleasure.

A large part of this protocol was taken from recent text-input-v3, and some 
description text was improved. Still, the protocol has a couple of rough edges, 
which is why it's titled RFC and not a patch.

The issues I have had most trouble with are related to the handling of keyboard 
grabs. These are meant to allow traditional, keyboard-based input methods, to 
take over keyboard input in order to compose text in a different way.

First, keyboard grabs are defined as unreliable. I'm not sure whether this is 
the right choice, but given that making them more reliable seems rather 
complicated, this is the default one.

In addition, handling the keyboard events themselves is troublesome, because an 
input method, even if it has a surface, is not meant to have keyboard focus 
while it's in operation. Returning wl_keyboard as new_id seems not to be 
possible due to versioning. Should the request make an existing wl_keyboard 
instance change behaviour? Or perhaps there should be a new 
zwp_input_method_keyboard mimicking the wl_keyboard interface?

I'm interested in your opinions.

Thank you,
Dorota Czaplejewicz 

 Makefile.am|   1 +
 unstable/input-method/input-method-unstable-v2.xml | 403 +
 2 files changed, 404 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..8cf8e29
--- /dev/null
+++ b/unstable/input-method/input-method-unstable-v2.xml
@@ -0,0 +1,403 @@
+
+
+
+  
+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