Re: Input method and input/output redirect under wayland

2012-08-30 Thread Yichao Yu
On Thu, Aug 30, 2012 at 5:56 PM, Jan Arne Petersen wrote: > On 08/30/2012 11:15 PM, Yichao Yu wrote: >> On Thu, Aug 30, 2012 at 3:32 PM, Jan Arne Petersen >> wrote: >>> The im server would just specify a surface, see current input_panel >>> interface at >>> http://cgit.freedesktop.org/wayland/wes

Re: Input method and input/output redirect under wayland

2012-08-30 Thread Jan Arne Petersen
On 08/30/2012 11:15 PM, Yichao Yu wrote: > On Thu, Aug 30, 2012 at 3:32 PM, Jan Arne Petersen > wrote: >> The im server would just specify a surface, see current input_panel >> interface at >> http://cgit.freedesktop.org/wayland/weston/tree/protocol/desktop-shell.xml?id=86adef9d54d41b1594749c00aba

[PATCH weston 5/5] compositor: triangle fan debug

2012-08-30 Thread Rob Clark
From: Pekka Paalanen Draw the borders of all the triangles. v1: original v2: add keybinding to enable/disable fan debug (super-alt-space), cycle colors to make it easier to see individual draws, and redraw undamaged region to clean up previous frames debug lines Signed-off-by: Rob C

[PATCH weston 4/5] compositor: fix blending for full-surface alpha

2012-08-30 Thread Rob Clark
From: Pekka Paalanen We can use and render the opaque region only, if we are not applying a full-surface alpha. Test case: weston-terminal; use super+alt+mousewheel to adjust the window transparency. Before it went black, now it blends correctly. Signed-off-by: Pekka Paalanen --- src/composit

[PATCH weston 3/5] compositor: specialised fragment shader for RGBX

2012-08-30 Thread Rob Clark
From: Pekka Paalanen Remove the weston_surface::blend attribute, which really meant that the texture produced valid alpha values. This was used to override the opaque region for RGBX surfaces, which produce undefined values for alpha. Instead, compile a new shader especially for RGBX surfaces, t

[PATCH weston 2/5] compositor: simplify shaders

2012-08-30 Thread Rob Clark
From: Rob Clark Re-work how the shaders and emitted vertices work. Rather than always rendering clip-rect sized quads and doing transformation in tex coords (and requiring the corresponding clipping in frag shader), instead emit transformed vertices, clipped wrt. dirty region, and use simpler fr

[PATCH weston 1/5] compositor: add support for OES_EGL_image_external

2012-08-30 Thread Rob Clark
From: Rob Clark In cases where the GPU can natively handle certain YUV formats, eglQueryWaylandBufferWL() can return the value EGL_TEXTURE_EXTERNAL_WL and the compositor will treat the buffer as a single egl-image-external. See: http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_e

[PATCH weston 0/5] rendering optimizations

2012-08-30 Thread Rob Clark
From: Rob Clark This patchset is an updated version of my earlier patches, plus a bunch of updates from Pekka. Some have Pekka's fixes have been squashed. Also, I have made some updates to the triangle-fan debug to enable dynamic enable/disable and a few other tweaks. Pekka Paalanen (3): com

Re: Input method and input/output redirect under wayland

2012-08-30 Thread Yichao Yu
On Thu, Aug 30, 2012 at 3:32 PM, Jan Arne Petersen wrote: > Hi, > >> A practical thing the im server can do is to let the compositor >> transform/redirect it's window, in the same way with the input window >> and the input method will just need to provide the relative position >> with the input wi

Re: Input method and input/output redirect under wayland

2012-08-30 Thread Yichao Yu
On Thu, Aug 30, 2012 at 2:16 PM, Bill Spitzak wrote: > > > Michael Hasselmann wrote: > >>> For some input method (especially for CJK), it is important to have >>> some user interaction before some text is finally committed (e.g. >>> there might be more than one candidate words for a single input >

[PATCH weston 2/2] simple-egl: Only set alpha_size=0 when -o is passed.

2012-08-30 Thread Scott Moreau
When starting simple-egl with -f for fullscreen and toggling to 'windowed' mode with F11, the surface is opaque instead of semi-trnasparent as it is when starting without -f. We only want to create the surface with alpha_size=0 when the user explicitly passes -o because otherwise it will never h

[PATCH weston 1/2] simple-egl: Remove unused variable.

2012-08-30 Thread Scott Moreau
--- clients/simple-egl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clients/simple-egl.c b/clients/simple-egl.c index c52c82c..5b77b9d 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -61,7 +61,7 @@ struct geometry { struct window { struct d

Re: Input method and input/output redirect under wayland

2012-08-30 Thread Jan Arne Petersen
Hi, > A practical thing the im server can do is to let the compositor > transform/redirect it's window, in the same way with the input window > and the input method will just need to provide the relative position > with the input window. > > Is there any plans/ideas on such a protocol or how such

Re: Input method and input/output redirect under wayland

2012-08-30 Thread Bill Spitzak
Michael Hasselmann wrote: For some input method (especially for CJK), it is important to have some user interaction before some text is finally committed (e.g. there might be more than one candidate words for a single input string), and for better user experience, it is important to show this

[PATCH 12/12] text: Split text and input-method protocols

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen It makes sense to split the interfaces in a text and a input-method protocol for now (only the text protocol needs to be used in toolkits). --- clients/.gitignore| 2 ++ clients/Makefile.am | 6 ++-- clients/keyboard.c| 2 +- protocol/Makefile.am

[PATCH 11/12] text: Fix set_surrounding_text request

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Add cursor and anchor positions as arguments to the set_surrounding_text request. The cursor and anchor positions are relative to the surrounded text, so it does not make sense to have that separate. Remove the separate set_cursor_index and set_selected_text requests. Also

[PATCH 10/12] editor: Add support for setting a preedit

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Add support for setting a preedit text to the editor example. --- clients/editor.c | 89 ++-- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 3bac252..ac16c93 1006

[PATCH 09/12] editor: Add support for selection

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Make it possible to select text and render the selection to the editor example. --- clients/editor.c | 74 1 file changed, 74 insertions(+) diff --git a/clients/editor.c b/clients/editor.c index 4720dd9..3bac252 10

[PATCH 06/12] editor: Extract text handling into text_layout

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Create a text_layout struct and functions for handling simple text layouts. --- clients/editor.c | 99 +--- 1 file changed, 94 insertions(+), 5 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 540642b

[PATCH 07/12] editor: Add support for cursor

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Add support for setting, moving and rendering a cursor. --- clients/editor.c | 100 +++ 1 file changed, 100 insertions(+) diff --git a/clients/editor.c b/clients/editor.c index f3b374c..33e9d3d 100644 --- a/clients/edit

[PATCH 05/12] editor: Make text_entry a widget

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Simplify the example client by making text_entry a widget. --- clients/editor.c | 179 +-- 1 file changed, 94 insertions(+), 85 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index ea78429..540642b 100644

[PATCH 08/12] editor: Insert commit-string at cursor

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Instead of appending at the end, insert the commit-string at the cursor position. --- clients/editor.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 33e9d3d..4720dd9 100644 ---

[PATCH 04/12] text: Add some documentation to the text protocol

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen --- protocol/text.xml | 73 --- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/protocol/text.xml b/protocol/text.xml index 7554167..a196b55 100644 --- a/protocol/text.xml +++ b/protocol/text.xml @@ -1,5 +

[PATCH 03/12] text: Introduce input_method_context interface

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Add an input_method_context interface which is the representation of a text_model on input_method side. --- clients/keyboard.c | 39 - protocol/text.xml | 15 +++- src/text-backend.c | 100 ++--- 3

[PATCH 01/12] text: Remove surface arg in create_text_model

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Remove the wl_surface argument from create_text_model request. The wl_surface is specified as an argument in the activate request instead. --- clients/editor.c | 6 ++ protocol/text.xml | 1 - src/text-backend.c | 4 ++-- 3 files changed, 4 insertions(+), 7 deletio

[PATCH 02/12] text: Have only one text_model_factory

2012-08-30 Thread Jan Arne Petersen
From: Philipp Brüschweiler Have only one text_model_factory instead of one per seat. This commit also introduces destruction of an input method when the corresponding seat is removed. --- src/compositor.c | 1 + src/compositor.h | 3 +++ src/text-backend.c | 75 +++

[PATCH 00/12] Improved text protocol and editor example

2012-08-30 Thread Jan Arne Petersen
From: Jan Arne Petersen Fixed some small bugs in still open patches, and added them here since they are dependencies of the other changes. Improved the editor example adding cursor and selection support. Improved the set_surrounding_text request in text_model. Jan Arne Petersen (11): text: R

Re: [RFC weston] compositor: optimize/simplify shaders

2012-08-30 Thread Rob Clark
On Thu, Aug 30, 2012 at 6:11 AM, Pekka Paalanen wrote: > On Wed, 29 Aug 2012 19:18:17 -0500 > Rob Clark wrote: > >> On Tue, Aug 28, 2012 at 8:27 AM, Pekka Paalanen wrote: >> > On Mon, 27 Aug 2012 17:03:10 +0300 >> > Pekka Paalanen wrote: >> > >> >> Hi Rob, >> >> >> >> I've started reviewing you

Re: [PATCH wayland] Add a relative_grab request to the wl_shell_surface interface

2012-08-30 Thread Vincent Povirk
> wl_pointer::enter event carries x,y, so even for relative pointer > mode, it can tell at which point on the surface the pointer comes in. > After that, the application can accumulate relative events to know the > position inside the surface. > > Except that won't really work. I believe the relati

Re: [RFC weston] compositor: optimize/simplify shaders

2012-08-30 Thread Pekka Paalanen
On Thu, 30 Aug 2012 14:11:41 +0300 Pekka Paalanen wrote: > On Wed, 29 Aug 2012 19:18:17 -0500 > Rob Clark wrote: > > > On Tue, Aug 28, 2012 at 8:27 AM, Pekka Paalanen wrote: > > > On Mon, 27 Aug 2012 17:03:10 +0300 > > > Pekka Paalanen wrote: > > > > > >> Hi Rob, > > >> > > >> I've started re

Re: [RFC weston] compositor: optimize/simplify shaders

2012-08-30 Thread Pekka Paalanen
On Wed, 29 Aug 2012 19:18:17 -0500 Rob Clark wrote: > On Tue, Aug 28, 2012 at 8:27 AM, Pekka Paalanen wrote: > > On Mon, 27 Aug 2012 17:03:10 +0300 > > Pekka Paalanen wrote: > > > >> Hi Rob, > >> > >> I've started reviewing your patch and fixing the remaining bugs. So far > >> I think I got mos

Re: [PATCH wayland] Add a relative_grab request to the wl_shell_surface interface

2012-08-30 Thread Pekka Paalanen
On Wed, 29 Aug 2012 20:35:34 -0500 Vincent Povirk wrote: > > Yup, good points here. I think we could reuse the wl_pointer > > interface, but just send relative motion in the motion event and it > > should go throught the wl_seat capability feature as Daniel describes. > > With this approach, is

Re: Input method and input/output redirect under wayland

2012-08-30 Thread Michael Hasselmann
On Mon, 2012-08-27 at 21:02 -0400, Yichao Yu wrote: > Hi, > > How can the proposed input method system[1] support the input method > server drawing a window around the cursor for user interaction? Best to check Weston keyboard example: http://cgit.freedesktop.org/wayland/weston/tree/clients/keybo