Re: Floating windows in input-method

2019-12-15 Thread Simon Ser
Hi Dorota,

On Sunday, December 15, 2019 7:55 PM, Dorota Czaplejewicz 
 wrote:

> Hi all,
>
> in order to give this change more traction, I've been thinking about
> slimming down the protocol, and removing floating windows from this
> revision.
>
> This would make the protocol easier to implement, and since we
> already have an implementation missing this feature in wlroots, also
> effectively verified. We've been successfully using the protocol on
> the Librem 5, and completion windows seem like something possible to
> mimic using a protocol like layer-shell, and in the phone case, this
> would be the desirable way to do it.
>
> Since floating windows are usually used for CJK languages on the
> desktop, can I get some opinions? Do you think the protocol would be
> useful and an improvement over the v1 even if it didn't initially
> include floating windows?

I think this is a good idea.

Doing this would ease protocol review and make it so the implementation
matches the protocol. The extra floating window bits can be added
later anyway, and we'll be able to discuss what's the best way to
implement them.

Btw, we are now using GitLab for wayland-protocols development: feel
free to submit your patch there (and potentially your earlier pending
patches too!).

Thanks,

Simon

> Thanks,
> Dorota Czaplejewicz
>
> On Thu, 4 Oct 2018 20:00:13 +
> Dorota Czaplejewicz dorota.czaplejew...@puri.sm 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 

Floating windows in input-method

2019-12-15 Thread Dorota Czaplejewicz
Hi all,

in order to give this change more traction, I've been thinking about slimming 
down the protocol, and removing floating windows from this revision.

This would make the protocol easier to implement, and since we already have an 
implementation missing this feature in wlroots, also effectively verified. 
We've been successfully using the protocol on the Librem 5, and completion 
windows seem like something possible to mimic using a protocol like 
layer-shell, and in the phone case, this would be the desirable way to do it.

Since floating windows are usually used for CJK languages on the desktop, can I 
get some opinions? Do you think the protocol would be useful and an improvement 
over the v1 even if it didn't initially include floating windows?

Thanks,
Dorota Czaplejewicz

On Thu,  4 Oct 2018 20:00:13 +
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