[PATCH weston] Fix a crash when parent surface is NULL.

2012-07-23 Thread Dima Ryazanov
It happens to me if I run gedit (using X11), click "Open", then press ESC to dismiss the dialog box. --- src/shell.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shell.c b/src/shell.c index a9e4d4f..9f201ca 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1246

Re: [PATCH weston] wcap: Fix t,ypo in us!age output.

2012-07-23 Thread Peng Huang
On Jul 23, 2012 1:53 PM, "Scott Moreau" wrote: > --- > wcap/main.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/wcap/main.c b/wcap/main.c > index 3b671b0..dbb902a 100644 > --- a/wcap/main.c > +++ b/wcap/main.c > @@ -154,7 +154,7 @@ usage(int exit_code) >

Re: [PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-07-23 Thread Daniel Stone
Hi, On 23 July 2012 21:48, Dima Ryazanov wrote: > But dlsym(RTLD_NEXT, "calloc") works, though - no need for dlopen. That's > how test-runner looks up "malloc" and "free". I meant dlsym uses calloc (through _dlerror_run) rather than dlopen, sorry. Cheers, Daniel

Re: [PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-07-23 Thread Dima Ryazanov
But dlsym(RTLD_NEXT, "calloc") works, though - no need for dlopen. That's how test-runner looks up "malloc" and "free". On Mon, Jul 23, 2012 at 1:02 PM, Daniel Stone wrote: > Hi, > > On 23 July 2012 16:11, Kristian Høgsberg wrote: > > On Mon, Jul 23, 2012 at 11:40:52AM +0300, Pekka Paalanen wro

Re: [PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-07-23 Thread Daniel Stone
Hi, On 23 July 2012 16:11, Kristian Høgsberg wrote: > On Mon, Jul 23, 2012 at 11:40:52AM +0300, Pekka Paalanen wrote: >> We don't have a realloc() wrapper yet, do we? >> Array uses realloc. We're missing calloc(), too, no? > > Yea, we don't have those. I came up against this a couple of weeks ag

Re: [PATCH weston 1/3] xwm: Initialize window decoration always as !override

2012-07-23 Thread Bill Spitzak
This looks like a serious problem that I don't see any workaround for. I think the idea that clients don't know their x/y position will have to be changed. This is incompatible with X and Windows (and I suspect with OS/X as well) and will cause a lot of trouble trying to write portable applica

[PATCH weston 5/5] Port to new drag & drop interface

2012-07-23 Thread Daniel Stone
Track the changes to the drag & drop protocol, in particular splitting wl_drag_offer and wl_selection_offer out of the singleton management protocol. Note that we can potentially have multiple drags active at once, although not all clients allow for this right now. This also removes dnd's self_on

[PATCH weston 4/5] Make use of new wl_cursors

2012-07-23 Thread Daniel Stone
Port the existing manual (and somewhat fragile) cursor-handling code to the new wl_cursor interface. Signed-off-by: Daniel Stone --- clients/window.c |6 +- src/compositor.c | 378 -- src/compositor.h | 16 ++- src/shell.c | 34 ++

[PATCH weston 1/5] evdev: Don't ignore multitouch touchscreens

2012-07-23 Thread Daniel Stone
Most touchscreen drivers provide ABS_X and BTN_TOUCH for legacy single-touch emulation modes, but this isn't mandatory. Make sure we don't ignore touchscreens with provide multitouch events with the new API only. Signed-off-by: Daniel Stone --- src/evdev.c |2 +- 1 file changed, 1 insertion

[PATCH weston 3/5] evdev: Release weston_seat with underlying evdev device

2012-07-23 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/evdev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c index 74662b2..62f1bc1 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -774,7 +774,7 @@ evdev_input_destroy(struct weston_seat *seat_base) evdev_remov

[PATCH weston 2/5] Fix memory leak on compositor exit

2012-07-23 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/compositor.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 19d5acf..132f09f 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3283,6 +3283,8 @@ weston_compositor_shutdown(struct weston_compositor *ec)

[PATCH wayland 10/10] Check clients holds implicit button grab in start_drag

2012-07-23 Thread Daniel Stone
Resolve a long-standing FIXME. Added a set of wl_data_transfer errors using an arbitrary base to distinguish from generic errors (e.g. invalid object). Signed-off-by: Daniel Stone --- src/data-transfer.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/data-

[PATCH wayland 08/10] wl_data_source: don't open-code wl_client_add_object

2012-07-23 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/data-device.c| 35 +++ src/wayland-server.h |3 ++- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/data-device.c b/src/data-device.c index ac3c7fb..0249abb 100644 --- a/src/data-device.c +++ b/src/

[PATCH wayland 06/10] Add cursor object representing the visible pointer

2012-07-23 Thread Daniel Stone
The wl_cursor object represents a visible on-screen cursor, with co-ordinates and a surface image. Add hooks for compositors to be able to discover new cursors and be informed when they change, and have the core implementation track the location. Signed-off-by: Daniel Stone --- src/data-device.

[PATCH wayland 07/10] wl_data_offer: don't open-code wl_client_new_object

2012-07-23 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/data-device.c| 32 ++-- src/wayland-server.h |3 ++- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/data-device.c b/src/data-device.c index c19e14f..ac3c7fb 100644 --- a/src/data-device.c +++ b/src/dat

[PATCH wayland 05/10] More consistent ID printing

2012-07-23 Thread Daniel Stone
Use unsigned rather than signed for IDs, so they match up with what we see in other prints. Signed-off-by: Daniel Stone --- src/connection.c|4 ++-- src/wayland-client.c| 14 +++--- src/wayland-server.c| 12 ++-- tests/connection-test.c |2 +- 4 files

[PATCH 0/15] New drag and drop interface

2012-07-23 Thread Daniel Stone
Hi all, This patchset contains a few miscellaneous fixes, as well as overhauling the drag & drop interface to support multitouch, and adding cursor tracking within wayland-server to be able to support multiple simultaneous cursors. Cheers, Daniel ___ wa

[PATCH wayland 01/10] .gitignore: Add ctags and cscope files

2012-07-23 Thread Daniel Stone
Signed-off-by: Daniel Stone --- .gitignore |2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 904eb50..0f449f5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ *.swp *~ .libs +cscope.out +ctags /aclocal.m4 /wayland-scanner.m4 /autom4te.cache -- 1

[PATCH wayland 04/10] Make NEW_IDs nullable

2012-07-23 Thread Daniel Stone
The connection-handling code already allows this, so make it legal in the protocol definition too. Signed-off-by: Daniel Stone --- src/connection.c | 33 - src/scanner.c|1 + src/wayland-client.c | 20 +++- 3 files changed, 48 i

[PATCH wayland 02/10] test-runner: Wrap realloc() too

2012-07-23 Thread Daniel Stone
So all our tests don't start failing just because we had the temerity to use realloc() rather than malloc(). Signed-off-by: Daniel Stone --- tests/test-runner.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test-runner.c b/tests/test-runner.c index c4a5

[PATCH wayland 03/10] Unstatic arg_count_for_signature and get_next_argument

2012-07-23 Thread Daniel Stone
Expose these to other files using wayland-private.h, so wayland-client.c can walk NULLables properly. Signed-off-by: Daniel Stone --- src/connection.c |9 ++--- src/wayland-private.h | 11 +++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/connection.c

Re: [PATCH weston] wcap: Fix typo in usage output.

2012-07-23 Thread Kristian Høgsberg
On Mon, Jul 23, 2012 at 11:53:18AM -0600, Scott Moreau wrote: > --- > wcap/main.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/wcap/main.c b/wcap/main.c > index 3b671b0..dbb902a 100644 > --- a/wcap/main.c > +++ b/wcap/main.c > @@ -154,7 +154,7 @@ usage(int exit_code

[PATCH weston] wcap: Fix typo in usage output.

2012-07-23 Thread Scott Moreau
--- wcap/main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcap/main.c b/wcap/main.c index 3b671b0..dbb902a 100644 --- a/wcap/main.c +++ b/wcap/main.c @@ -154,7 +154,7 @@ usage(int exit_code) "[--help] [--yuv4mpeg2] [--frame=] [--all] \n"

Re: [PATCH weston] wcap: Fix up --help.

2012-07-23 Thread Scott Moreau
On Mon, Jul 23, 2012 at 9:09 AM, Kristian Høgsberg wrote: > On Sun, Jul 22, 2012 at 06:51:27PM -0600, Scott Moreau wrote: > > --- > > wcap/main.c |9 ++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > I don't like the example filenames in the help text, but you have a > point t

Re: [PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-07-23 Thread Kristian Høgsberg
On Mon, Jul 23, 2012 at 11:40:52AM +0300, Pekka Paalanen wrote: > On Sun, 22 Jul 2012 14:24:15 -0400 > Kristian Høgsberg wrote: > > > > diff --git a/tests/array-test.c b/tests/array-test.c > > > index 7639878..ff5bb8c 100644 > > > --- a/tests/array-test.c > > > +++ b/tests/array-test.c > > > @@ -

Re: [PATCH weston] wcap: Fix up --help.

2012-07-23 Thread Kristian Høgsberg
On Sun, Jul 22, 2012 at 06:51:27PM -0600, Scott Moreau wrote: > --- > wcap/main.c |9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) I don't like the example filenames in the help text, but you have a point that dumping YUV4MPEG2 to the terminal isn't nice and it's not clear that

Re: [PATCH weston 2/2] desktop-shell: Declare grab_cursor as enum cursor_type.

2012-07-23 Thread Kristian Høgsberg
On Sun, Jul 22, 2012 at 06:23:52PM -0600, Scott Moreau wrote: > --- > clients/desktop-shell.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Cool, thanks. Kristian > diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c > index cf28246..61599c3 100644 > --- a/clients/desktop

Re: [PATCH weston 1/2] wcap: Declare variable with same sign as convert_to_yv12() expects.

2012-07-23 Thread Kristian Høgsberg
On Sun, Jul 22, 2012 at 06:23:51PM -0600, Scott Moreau wrote: > --- > wcap/main.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied. The bigger problem here was that we didn't include $(GCC_CFLAGS) in wcap_decode_CFLAGS. There's a few more warnings that show up once we

Re: [PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-07-23 Thread Pekka Paalanen
On Sun, 22 Jul 2012 14:24:15 -0400 Kristian Høgsberg wrote: > > diff --git a/tests/array-test.c b/tests/array-test.c > > index 7639878..ff5bb8c 100644 > > --- a/tests/array-test.c > > +++ b/tests/array-test.c > > @@ -60,7 +60,9 @@ TEST(array_add) > > > > /* add some data */ > > for (i =