[PATCH v2 00/17] Improved text protocol, editor and keyboard examples

Kristian Høgsberg hoegsberg at gmail.com
Wed Sep 12 14:38:24 PDT 2012


On Sun, Sep 09, 2012 at 11:08:29PM +0200, Jan Arne Petersen wrote:
> From: Jan Arne Petersen <jpetersen at openismus.com>
> 
> Fixed some small bugs in still open patches, and added them here since they are
> dependencies of the other changes.
> 
> Improve the editor example adding cursor, selection and pre-edit support.
> 
> Add a proper QWERTY keyboard layout example with upper- and lowercase
> letters.
> 
> Enhance the protocol with a better set_surrounding_text request, support for
> pre-edit strings, support for deleting text (delete_surrounding_text), support
> for control keys and a request to reset text buffers.
> 
> Show the enhanced protocol in the editor and keyboard examples.

The series looks good to me and I've commited it as is.  I did wonder
about a couple of things in the text protocol though:

 - Why is there a seat argument to text_model.deactivate?

 - Should the text_model.activated event carry the surface and seat it
   was activated for?  The protocol is asynchronous and we could in
   theory have deactivated and activated another surface when the
   client receives the activate event.

 - Are text_model.enter/leave better names for
   text_model.activated/deactivated?  It seems like these events are
   similar to wl_keyboard.enter/leave, and I think it's better to be
   consistent with that.

 - The text_model.key event introduces keysym in the protocol and
   assumes XKB keycodes.  I think that's fine, but I'm wondering if we
   need to communicate the keycode namespace we're using there
   somehow.

Kristian

> The patches are also at the https://github.com/openismus/weston repository.
> 
> Jan Arne Petersen (16):
>   text: Remove surface arg in create_text_model
>   text: Introduce input_method_context interface
>   text: Add some documentation to the text protocol
>   editor: Make text_entry a widget
>   editor: Extract text handling into text_layout
>   editor: Add support for cursor
>   editor: Insert commit-string at cursor
>   editor: Add support for selection
>   editor: Add support for setting a preedit
>   text: Fix set_surrounding_text request
>   text: Split text and input-method protocols
>   keyboard: Use a qwerty virtual keyboard layout
>   text: Add support for pre-edit string
>   text: Add delete_surrounding_text to protocol
>   text: Add support for control keys to the protocol
>   text: Add reset requets to protocol
> 
> Philipp Brüschweiler (1):
>   text: Have only one text_model_factory
> 
>  clients/.gitignore        |   2 +
>  clients/Makefile.am       |   6 +-
>  clients/editor.c          | 642 +++++++++++++++++++++++++++++++++++++++-------
>  clients/keyboard.c        | 306 +++++++++++++++++++---
>  protocol/Makefile.am      |   1 +
>  protocol/input-method.xml |  98 +++++++
>  protocol/text.xml         | 104 ++++++--
>  src/.gitignore            |   2 +
>  src/Makefile.am           |   4 +
>  src/compositor.c          |   1 +
>  src/compositor.h          |   3 +
>  src/text-backend.c        | 245 ++++++++++++++----
>  tests/test-text-client.c  |  19 +-
>  tests/text-test.c         |   2 +-
>  14 files changed, 1232 insertions(+), 203 deletions(-)
>  create mode 100644 protocol/input-method.xml
> 
> -- 
> 1.7.11.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list