Re: how to remove that hardcoded legacy modifier masks like XKB_COMMON_SHIFT_MASK

2012-05-02 Thread Juan Zhao
On 05/03/2012 12:02 PM, Juan Zhao wrote: On 05/03/2012 11:47 AM, Eoff, Ullysses A wrote: Juan, Your answer lies in https://bugs.freedesktop.org/show_bug.cgi?id=49385 Thanks for your information. In that bug thread, it is said Daniel already sent some patches related to this. Do you know wh

Re: [PATCH weston 0/5] xkbcommon updates

2012-05-02 Thread Juan Zhao
On 05/02/2012 03:37 AM, Daniel Stone wrote: Hi, This patchset updates the clients to the new xkbcommon API (which just dropped in master, although it's been sitting in my personal tree for some time now), and also introduces XKB support in the compositor. The latter is unused for now, but will

Re: [PATCH] compositor: allow query of surface formats.

2012-05-02 Thread Gwenole Beauchesne
Hi, 2012/5/2 Pekka Paalanen : > On Fri, 27 Apr 2012 17:52:11 +0200 >> Add new query to collect surface formats supported for rendering through >> surface_format events. This allows for checking whether the compositor >> supports rendering YUV buffers for example. >> >> Note: this depends on the ge

Re: how to remove that hardcoded legacy modifier masks like XKB_COMMON_SHIFT_MASK

2012-05-02 Thread Juan Zhao
On 05/03/2012 11:47 AM, Eoff, Ullysses A wrote: Juan, Your answer lies in https://bugs.freedesktop.org/show_bug.cgi?id=49385 Thanks for your information. In that bug thread, it is said Daniel already sent some patches related to this. Do you know which are them, I'd like to have a try. :)

RE: how to remove that hardcoded legacy modifier masks like XKB_COMMON_SHIFT_MASK

2012-05-02 Thread Eoff, Ullysses A
Juan, Your answer lies in https://bugs.freedesktop.org/show_bug.cgi?id=49385 U. Artie Eoff >-Original Message- >From: wayland-devel- >bounces+ullysses.a.eoff=intel@lists.freedesktop.org [mailto:wayland- >devel-bounces+ullysses.a.eoff=intel@lists.freedesktop.org] On Behalf >Of Jua

how to remove that hardcoded legacy modifier masks like XKB_COMMON_SHIFT_MASK

2012-05-02 Thread Juan Zhao
Hi Daniel, I saw your patch in xkbcommom: http://cgit.freedesktop.org/xorg/lib/libxkbcommon/commit/?id=3dcd7ae02ccfd47b2a9a552daa225255803e66cf It deletes the macros like XKB_COMMON_SHIFT_MASK. You suggest to use the xkb_state_mod_* and xkb_map_mod_* API instead. Would Weston also u

Re: [PATCH wayland 4/5] Add support for signed 24.8 decimal numbers

2012-05-02 Thread Daniel Stone
Hi, On 2 May 2012 18:02, Kristian Høgsberg wrote: > On Wed, May 2, 2012 at 11:48 AM, Daniel Stone wrote: >> On 2 May 2012 12:57, Pekka Paalanen wrote: >>> Since we use double as the API type, should there not be a check for >>> out-of-bounds values? Perhaps even #defined min and max values apps

Re: [PATCH wayland 4/5] Add support for signed 24.8 decimal numbers

2012-05-02 Thread Kristian Høgsberg
On Wed, May 2, 2012 at 11:48 AM, Daniel Stone wrote: > Hi, > > On 2 May 2012 12:57, Pekka Paalanen wrote: >> Hmm, any reason for not doing this instead? >>        *p = (int32_t)trunc(d * 256.0) > > Wow is that ever embarrassing. > >> Also, any rationale in choosing trunc() instead of round() or >

[PATCH wayland v2 5/6] Add support for signed 24.8 decimal numbers

2012-05-02 Thread Daniel Stone
signed_24_8 is a signed decimal type which offers a sign bit, 23 bits of integer precision, and 8 bits of decimal precision. This is converted to double on the C API side, as passing through varargs involves an implicit type promotion to double anyway. Signed-off-by: Daniel Stone --- src/Makefi

[PATCH wayland 6/6] Input: Convert pointer co-ordinates to signed_24_8

2012-05-02 Thread Daniel Stone
This offers more precision when using devices like tablets, and also for transformed surfaces. Signed-off-by: Daniel Stone --- protocol/wayland.xml | 24 1 file changed, 12 insertions(+), 12 deletions(-) v2: No changes. diff --git a/protocol/wayland.xml b/protocol/wa

[PATCH wayland v2 2/6] tests: Add should_fail argument to marshal_demarshal

2012-05-02 Thread Daniel Stone
Allows us to check that obviously incorrect data gets rejected as it should by the marshalling code. Signed-off-by: Daniel Stone --- tests/connection-test.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) v2: New, no functional changes. diff --git a/tests/connection-

[PATCH wayland v2 0/5] Convert input co-ordinates to fixed-point

2012-05-02 Thread Daniel Stone
Hi, This series is a v2 for the protocol changes I posted earlier; the three Weston patches remain the same. Negative and large values are now handled correctly, and the code now makes use of more sensible multiplication and division rather than scary (and incorrect) bitshifting and masking. I've

[PATCH wayland 1/6] tests: Fix out-of-tree builds

2012-05-02 Thread Daniel Stone
Make sure we include any generated headers from src/ as well, like wayland-version.h. Signed-off-by: Daniel Stone --- tests/Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v2: No changes. diff --git a/tests/Makefile.am b/tests/Makefile.am index 7449545..767919e 100644 ---

[PATCH wayland 4/6] Rename key/button 'state' to is_down

2012-05-02 Thread Daniel Stone
As it's actually a boolean to indicate whether or not the key or button is down, rather than a 32-bit wide state mask. Signed-off-by: Daniel Stone --- protocol/wayland.xml |4 ++-- src/data-device.c|6 +++--- src/wayland-server.c | 10 +- src/wayland-server.h |4 ++-- 4

[PATCH wayland 3/6] Use unsigned for key/button up/down state in grabs

2012-05-02 Thread Daniel Stone
Since we just use it as a simple boolean flag, might as well convert it to unsigned. Signed-off-by: Daniel Stone --- src/data-device.c|2 +- src/wayland-server.c |4 ++-- src/wayland-server.h |4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) v2: No changes. diff --git a

Re: [PATCH wayland 4/5] Add support for signed 24.8 decimal numbers

2012-05-02 Thread Daniel Stone
Hi, On 2 May 2012 12:57, Pekka Paalanen wrote: > Hmm, any reason for not doing this instead? >        *p = (int32_t)trunc(d * 256.0) Wow is that ever embarrassing. > Also, any rationale in choosing trunc() instead of round() or > ceil/floor? > > trunc() makes > 0.9 -> 0 > -0.9 -> 0 > which mean

Re: [PATCH wayland 4/5] Add support for signed 24.8 decimal numbers

2012-05-02 Thread Bill Spitzak
On 05/02/2012 04:57 AM, Pekka Paalanen wrote: On Tue, 1 May 2012 20:30:15 +0100 Daniel Stone wrote: + u = trunc(d); + *p = u<< 8; + *p |= (uint32_t) (trunc((fabs(d - u)) * (1<< 8)))& 0xff; Hmm, any reason for not doing t

Re: [PATCH] Weston: window.c: add icon, minimize, maximize, close

2012-05-02 Thread Ander Conselvan de Oliveira
On 05/02/2012 04:34 PM, Kristian Høgsberg wrote: Another good project would be good to be parse Xcursor files instead of hardcoding a bunch of pngs here. I have some code for doing that lost in a branch somewhere. I try to dig it up and rebase it. Ander

Re: [PULL demos] eglut: Add wayland support

2012-05-02 Thread Kristian Høgsberg
On Wed, May 02, 2012 at 02:52:03PM +0800, zhiwen...@linux.intel.com wrote: > The following changes since commit ebe0ddf657903bef32a161dc66254fbf8725f986: > > util: add gl_wrap.h and glu_wrap.h to libutil_la_SOURCES (2012-04-23 > 08:21:43 -0600) Thanks, that's a good start. There are still a f

Re: wayland/weston on displaylink?

2012-05-02 Thread Kristian Høgsberg
On Wed, May 02, 2012 at 02:13:37PM +0300, Pekka Paalanen wrote: > On Mon, 30 Apr 2012 21:23:11 +0200 > Sander wrote: > > > Hello All, > > > > Would it be possible to run weston on a displaylink device? > > > > I compiled a 3.4-rc5 kernel with: > > > > x301:/usr/src/linux-3.4-rc5# grep DRM.*=y

Re: [PATCH v2 0/3] Reuse KMS FBs for gbm surface bos

2012-05-02 Thread Kristian Høgsberg
On Wed, May 02, 2012 at 04:42:20PM +0300, Ander Conselvan de Oliveira wrote: > Hi, > > Here is the second version of the patch for reusing the KMS FBs. The > first patch implements this while refactoring the output code a bit. What a great clean up, that makes a lot of sense. We still don't reus

[PATCH 3/3] simple-egl: add option for running fullscreen

2012-05-02 Thread Ander Conselvan de Oliveira
--- clients/simple-egl.c | 180 -- 1 files changed, 174 insertions(+), 6 deletions(-) diff --git a/clients/simple-egl.c b/clients/simple-egl.c index c0e2855..b21d542 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -34,16 +34,20 @@

[PATCH 2/3] compositor-drm: alow scanning out of buffers with XRGB8888 format

2012-05-02 Thread Ander Conselvan de Oliveira
--- src/compositor-drm.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index a05b2c8..21e59c8 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -238,10 +238,6 @@ drm_output_prepare_scanout_surface(struc

[PATCH 1/3] compositor-drm: refactor to avoid unnecessary allocation of KMS FBs

2012-05-02 Thread Ander Conselvan de Oliveira
Currently, the drm backend will create and destroy a KMS FB for each frame. However, the bos for a gbm surface are reused (at least with mesa) so we can store the fb_id on it and destroy it only on the bo's destroy callback. To use the same path for scanning out client buffers, some refactor was n

[PATCH v2 0/3] Reuse KMS FBs for gbm surface bos

2012-05-02 Thread Ander Conselvan de Oliveira
Hi, Here is the second version of the patch for reusing the KMS FBs. The first patch implements this while refactoring the output code a bit. I used patches 2 and 3 for testing the client buffer scanout path. They may not be commit-ready. Ander Conselvan de Oliveira (3): compositor-drm: refact

Re: [PATCH] server: Post new globals to current clients

2012-05-02 Thread Kristian Høgsberg
On Wed, May 02, 2012 at 08:46:47AM +0200, npouil...@freebox.fr wrote: > From: Nicolas Pouillon > > Globals are bursted to client on conntect. Now when new global > objects are added to the server state, existing clients also get > notified. Thanks, that was always supposed to be there :) Kristi

Re: [PATCH 2/2] compositor-drm: don't create and destroy kms fbs on every frame

2012-05-02 Thread Ander Conselvan de Oliveira
On 04/30/2012 08:06 PM, Kristian Hoegsberg wrote: On Mon, Apr 30, 2012 at 01:31:29PM +0300, Ander Conselvan de Oliveira wrote: Use the new gbm_get/set_user_data() to reuse the kms fbs if the gbm surface's bo's are reused. This doesn't look right. drm_output_render() always allocates and sets

Re: [PATCH] Weston: window.c: add icon, minimize, maximize, close

2012-05-02 Thread Kristian Høgsberg
On Wed, May 02, 2012 at 01:00:10AM +0200, Martin Minarik wrote: > This provides basic icon and minimize, maximize, close buttons for window > frame. Very nice, thanks for looking into this. > > > diff --git a/clients/window.c b/clients/window.c > index 2390485..790e849 100644 > --- a/client

Re: [PATCH wayland 4/5] Add support for signed 24.8 decimal numbers

2012-05-02 Thread Pekka Paalanen
On Tue, 1 May 2012 20:30:15 +0100 Daniel Stone wrote: > signed_24_8 is a signed decimal type which offers a sign bit, 23 bits of > integer precision, and 8 bits of decimal precision. This is converted > to double on the C API side, as passing through varargs involves an > implicit type promotio

Re: [PATCH] Keep client object reference when marking it as zombie

2012-05-02 Thread Arnaud Vrac
On 05/02/2012 01:17 PM, Arnaud Vrac wrote: > This will avoid a race condition on the client side when thread safety > is implemented. The destruction of a proxy might be done after the > deletion of its object id in this case: the destruction of the proxy is > done from the thread in which the obje

[PATCH] Keep client object reference when marking it as zombie

2012-05-02 Thread Arnaud Vrac
This will avoid a race condition on the client side when thread safety is implemented. The destruction of a proxy might be done after the deletion of its object id in this case: the destruction of the proxy is done from the thread in which the object was created, and the deletion of the object id i

Re: wayland/weston on displaylink?

2012-05-02 Thread Pekka Paalanen
On Mon, 30 Apr 2012 21:23:11 +0200 Sander wrote: > Hello All, > > Would it be possible to run weston on a displaylink device? > > I compiled a 3.4-rc5 kernel with: > > x301:/usr/src/linux-3.4-rc5# grep DRM.*=y .config > CONFIG_DRM=y > CONFIG_DRM_USB=y > CONFIG_DRM_KMS_HELPER=y > CONFIG_DRM_UDL

Re: [PATCH] compositor: allow query of surface formats.

2012-05-02 Thread Pekka Paalanen
On Fri, 27 Apr 2012 17:52:11 +0200 Gwenole Beauchesne wrote: > Hi, > > Add new query to collect surface formats supported for rendering through > surface_format events. This allows for checking whether the compositor > supports rendering YUV buffers for example. > > Note: this depends on the ge

Re: Weston on Android - First light

2012-05-02 Thread Pekka Paalanen
On Tue, 1 May 2012 02:06:04 -0700 Graham Cantin wrote: > > On Fri, 27 Apr 2012 07:44:00 -0700 (PDT) > > yan.w...@linux.intel.com wrote: > > > > > Very cool. Is it native app? In the future, will it support JAVA > > > app? > > > > It is native, but it is not buildable by the NDK. I build it > > as