Re: [PATCH 1/2] compositor-wayland: Make sure border fields are set before wayland_compositor_create_output and document some function dependencies.

2012-10-09 Thread Kristian Høgsberg
On Thu, Oct 04, 2012 at 08:42:16PM +0200, John Kåre Alsaker wrote: And the border is back - thanks. Kristian > --- > src/compositor-wayland.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c > index 05f21

Re: [PATCH weston] compositor: Don't use surface_list when out of scope.

2012-10-09 Thread Kristian Høgsberg
On Sun, Oct 07, 2012 at 08:56:29AM -0600, Scott Moreau wrote: > The surface_list can only be used when called in a path originating from > weston_output_repaint(). Additionally, the calls omitted by this patch were > redundant since they were called in paths ultimately leading to a repaint > call,

Re: [PATCH weston] clients: Set title for all shell surface demos.

2012-10-09 Thread Kristian Høgsberg
On Sun, Oct 07, 2012 at 08:56:30AM -0600, Scott Moreau wrote: That makes sense, thanks. Kristian > --- > clients/flower.c | 1 + > clients/simple-egl.c | 2 ++ > clients/simple-shm.c | 2 ++ > clients/simple-touch.c | 1 + > 4 files changed, 6 insertions(+) > > diff --git a/clients/f

Re: [PATCH] shell: restore correct layer in shell_unset_fullscreen

2012-10-09 Thread Kristian Høgsberg
On Sun, Oct 07, 2012 at 08:25:36PM +0200, Rafal Mielniczuk wrote: > This fixes the bug where surface is above panel_layer > just after it is restored from fullscreen mode. > > How to reproduce: > * move surface under panel > * set surface fullscreen > * restore surface to normal mode Ah, yup, I s

Re: [PATCH 1/8] evdev-touchpad: Twiddle finger_state correctly

2012-10-09 Thread Kristian Høgsberg
On Tue, Oct 09, 2012 at 06:44:29PM +0100, Rob Bradford wrote: > From: Rob Bradford > > The original code always set the finger_state to the appropriate bitmask > irrespective of whether the event was a press or a release. It would also blat > all members of the bitmask rather than ORing in the ne

Re: [PATCH 2/2] connection: Add missing free from error path

2012-10-09 Thread Kristian Høgsberg
On Tue, Oct 09, 2012 at 06:46:22PM +0100, Rob Bradford wrote: > From: Rob Bradford > > On the error codepath that errors out on ENOMEM we should free the allocated > closure. Yes, that's better. Kristian > Signed-off-by: Rob Bradford > --- > src/connection.c | 1 + > 1 file changed, 1 insert

Re: [PATCH 1/2] xcursor: Fix allocation based on string length

2012-10-09 Thread Kristian Høgsberg
On Tue, Oct 09, 2012 at 06:46:21PM +0100, Rob Bradford wrote: > From: Rob Bradford > > strlen() doesn't include the terminating NUL. Therefore when allocating a > block of memory to hold something equivalent to the length of the string we > must increment to take the NUL byte into consideration.

Re: [PATCH 5/8] backlight: Avoid buffer overflow in the use of readline

2012-10-09 Thread Kristian Høgsberg
On Tue, Oct 09, 2012 at 06:44:33PM +0100, Rob Bradford wrote: > From: Rob Bradford > > readline() returns the number of bytes that it has written excluding any NUL > byte (since it does not write that itself.) This could lead to attempting to > access beyond the end of buffer if the destination o

Re: [PATCH 4/8] evdev-touchpad: Iterate over the touchpad spec table correctly

2012-10-09 Thread Kristian Høgsberg
On Tue, Oct 09, 2012 at 06:44:32PM +0100, Rob Bradford wrote: > From: Rob Bradford > > The original code would overrun since the calculation of the range did not > take into consideration the size of the entries in the table. Oh oops. I tweaked the patch to use the ARRAY_LENGTH macro instead.

Re: [PATCH weston] window: Initialize workspace state before first roundtrip

2012-10-09 Thread Kristian Høgsberg
On Mon, Oct 08, 2012 at 10:49:04PM +0200, Jonas Ådahl wrote: > The workspace state parameters were initialized after the first > roundtrip. If a workspace manager state event was received during this > roundtrip the state parameters were cleared leaving an incorrect state. Thanks, applied. Kristi

Re: [PATCH wayland 1/4] doc: Improve Wire Format section

2012-10-09 Thread Kristian Høgsberg
On Mon, Oct 08, 2012 at 06:39:57PM +0300, Tiago Vignatti wrote: > Fixed the wayland socket name and added documentation for fixed format. Thanks, this and the other three doc fixes applied. Kristian > Signed-off-by: Tiago Vignatti > --- > doc/Wayland/en_US/Protocol.xml | 22 +

[PATCH 8/8] connection: Move object lookup out of wl_connection_demarshal()

2012-10-09 Thread Kristian Høgsberg
On the client side where we queue up multiple events before dispatching, we need to look up the receiving proxy and argument proxies immediately before calling the handler. Between queueing up multiple events and eventually invoking the handler, previous handlers may have destroyed some of the pro

[PATCH 7/8] Split the global registry into its own wl_registry object

2012-10-09 Thread Kristian Høgsberg
The only way to make the global object listener interface thread safe is to make it its own interface and make different listeners different wl_proxies. The core of the problem is the callback we do when a global show up or disappears, which we can't do with a lock held. On the other hand we can't

[PATCH 6/8] scanner: Generate client stubs for wl_display requests

2012-10-09 Thread Kristian Høgsberg
We used to special case this because of the untyped new-id argument in the bind request. Now that the scanner can handle that, we can remove the special case. --- src/scanner.c|4 src/wayland-client.c | 31 --- src/wayland-client.h | 17 ---

[PATCH 5/8] scanner: Send interface name and version for types new_id args

2012-10-09 Thread Kristian Høgsberg
This makes the scanner generate the code and meta data to send the interface name and version when we pass a typeless new_id. This way, the generic factory mechanism provided by wl_display.bind can be provided by any interface. --- protocol/wayland.xml |6 ++ src/scanner.c| 56 +

[PATCH 4/8] client: Add wl_event_queue for multi-thread dispatching

2012-10-09 Thread Kristian Høgsberg
This introduces wl_event_queue, which is what will make multi-threaded wayland clients possible and useful. The driving use case is that of a GL rendering thread that renders and calls eglSwapBuffer independently of a "main thread" that owns the wl_display and handles input events and everything e

[PATCH 3/8] client: Make wl_display thread safe

2012-10-09 Thread Kristian Høgsberg
Not all entry points are thread safe: global listeners and global lookup is still only main thread. --- src/wayland-client.c | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 2265ed6..

[PATCH 2/8] client: Split event handling into demarshal and dispatch steps

2012-10-09 Thread Kristian Høgsberg
This lets us demarshal with a mutex held and then do dispatching after releasing the mutex. --- src/wayland-client.c | 68 ++--- src/wayland-private.h |1 + 2 files changed, 49 insertions(+), 20 deletions(-) diff --git a/src/wayland-client.c b/sr

[PATCH 1/8] Change filedescriptor API to be thread safe

2012-10-09 Thread Kristian Høgsberg
The update callback for the file descriptors was always a bit awkward and un-intuitive. The idea was that whenever the protocol code needed to write data to the fd it would call the 'update' function. This function would adjust the mainloop so that it polls for POLLOUT on the fd so we can eventua

[PATCH 0/8] Thread safety patches and 1.0 plan

2012-10-09 Thread Kristian Høgsberg
Hi all, Wayland 1.0 is just around the corner and we have a couple of blockers for that release: thread safety of the client side API and the surface commit feature. Pekka has been working on the commit part and these eight patches rework the client library to be thread safe. I've been meaning t

Re: Why does weston try to open .ini file 6 times?

2012-10-09 Thread Pekka Paalanen
On Tue, 9 Oct 2012 20:17:10 +0200 "Fred ." wrote: > $ weston > Date: 2012-10-09 CEST > [20:11:27.906] weston 0.95.0 >http://wayland.freedesktop.org/ >Bug reports to: > https://bugs.freedesktop.org/enter_bug.cgi?product=weston >Build: > [20:11:27.906

Re: [PATCH 1/8] evdev-touchpad: Twiddle finger_state correctly

2012-10-09 Thread Jonas Ådahl
On Tue, Oct 9, 2012 at 7:44 PM, Rob Bradford wrote: > From: Rob Bradford > > The original code always set the finger_state to the appropriate bitmask > irrespective of whether the event was a press or a release. It would also blat > all members of the bitmask rather than ORing in the new bit for

Why does weston try to open .ini file 6 times?

2012-10-09 Thread Fred .
$ weston Date: 2012-10-09 CEST [20:11:27.906] weston 0.95.0 http://wayland.freedesktop.org/ Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=weston Build: [20:11:27.906] OS: Linux, 3.5.0-17-generic, #27-Ubuntu SMP Fri Oct 5 01:35:26 UTC

[PATCH 1/2] xcursor: Fix allocation based on string length

2012-10-09 Thread Rob Bradford
From: Rob Bradford strlen() doesn't include the terminating NUL. Therefore when allocating a block of memory to hold something equivalent to the length of the string we must increment to take the NUL byte into consideration. Signed-off-by: Rob Bradford --- cursor/xcursor.c | 2 +- 1 file chang

[PATCH 2/2] connection: Add missing free from error path

2012-10-09 Thread Rob Bradford
From: Rob Bradford On the error codepath that errors out on ENOMEM we should free the allocated closure. Signed-off-by: Rob Bradford --- src/connection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/connection.c b/src/connection.c index dbe0fa9..8f4b44c 100644 --- a/src/connection.c

[PATCH 8/8] backlight: Jump to cleanup code if synthesizing backlight string fails

2012-10-09 Thread Rob Bradford
From: Rob Bradford This applies the same pattern as used in other error cases in this block - and cleans up the file desciptors and allocated memory too. Signed-off-by: Rob Bradford --- src/libbacklight.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libbackligh

[PATCH 4/8] evdev-touchpad: Iterate over the touchpad spec table correctly

2012-10-09 Thread Rob Bradford
From: Rob Bradford The original code would overrun since the calculation of the range did not take into consideration the size of the entries in the table. Cc:Jonas Ådahl Signed-off-by: Rob Bradford --- src/evdev-touchpad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 6/8] keyboard: Avoid access beyond end off buffer

2012-10-09 Thread Rob Bradford
From: Rob Bradford If the for loop does not match on a button it will fall through and try and dereference into the array using the terminating value of the loop. This terminating value of the loop is the dimension of the array and thus beyond its bounds. Cc: Jan Arne Petersen Signed-off-by: Ro

[PATCH 7/8] compositor-drm: Avoid leak during output configuration error path

2012-10-09 Thread Rob Bradford
From: Rob Bradford Signed-off-by: Rob Bradford --- src/compositor-drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 96d6611..78ad35d 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2407,6 +2407,7 @@ output_section_done(v

[PATCH 2/8] tty: Log error if we cannot setup a valid tty keyboard mode

2012-10-09 Thread Rob Bradford
From: Rob Bradford The previous logging code would never be reached - this change makes sure a message is reported if changing keyboard mode to either the desired (K_OFF) or fallback (K_RAW with handler that drops the events) fails. Signed-off-by: Rob Bradford --- src/tty.c | 9 +++-- 1 fi

[PATCH 3/8] evdev: Avoid unintended case drop through

2012-10-09 Thread Rob Bradford
From: Rob Bradford e->code is in the same range for ABS_ and for REL_. As the code currently stands and for the current values in Linux's input.h there is no risk of a problem. However just in case it would be wise to break after evaluating the relative events. Signed-off-by: Rob Bradford ---

[PATCH 5/8] backlight: Avoid buffer overflow in the use of readline

2012-10-09 Thread Rob Bradford
From: Rob Bradford readline() returns the number of bytes that it has written excluding any NUL byte (since it does not write that itself.) This could lead to attempting to access beyond the end of buffer if the destination of the link is exactly 100 bytes long. The standard solution to this is t

[PATCH 1/8] evdev-touchpad: Twiddle finger_state correctly

2012-10-09 Thread Rob Bradford
From: Rob Bradford The original code always set the finger_state to the appropriate bitmask irrespective of whether the event was a press or a release. It would also blat all members of the bitmask rather than ORing in the new bit for the event. Cc:Jonas Ådahl Signed-off-by: Rob Bradford ---

Re: [PATCH wayland 1/4] doc: Improve Wire Format section

2012-10-09 Thread Pekka Paalanen
On Tue, 09 Oct 2012 14:31:49 +0300 Tiago Vignatti wrote: > On 10/09/2012 09:34 AM, Pekka Paalanen wrote: > > On Mon, 8 Oct 2012 18:39:57 +0300 > > Tiago Vignatti wrote: > > > >> Fixed the wayland socket name and added documentation for fixed format. > >> > >> Signed-off-by: Tiago Vignatti > >

Re: [PATCH wayland 1/4] doc: Improve Wire Format section

2012-10-09 Thread Tiago Vignatti
On 10/09/2012 09:34 AM, Pekka Paalanen wrote: On Mon, 8 Oct 2012 18:39:57 +0300 Tiago Vignatti wrote: Fixed the wayland socket name and added documentation for fixed format. Signed-off-by: Tiago Vignatti Hi Tiago, nice! --- doc/Wayland/en_US/Protocol.xml | 22 +-

Re: [PATCH] Weston: weston.ini man page

2012-10-09 Thread Pekka Paalanen
On Mon, 8 Oct 2012 20:32:56 +0200 Martin Minarik wrote: > The man page is not very detailed and exceptionally accurate, but > it mentions the configuration options. > --- Hi Martin, cool, comments below. > man/weston.ini.5 | 184 > ++ > 1