[PATCH weston 3/4] data-device: Lookup drag resources using the focussed surface

2013-09-06 Thread Rob Bradford
From: Rob Bradford Rather than relying on focussed resource to get the client to lookup the drag resource with instead derive the client from the focussed surface. This is equivalent as the focussed resource is derived from the focussed surface in the weston_keyboard_set_focus function

[PATCH weston 2/4] input: Use a client destroy listener for resetting the focus resource

2013-09-06 Thread Rob Bradford
From: Rob Bradford This is currently equivalent as there is no way for the pointer, keyboard or touch resource to be destroyed without the client being destroyed. This removes another place where a single resource for the focus is assumed. --- src/input.c | 12 ++-- 1 file changed, 6

[PATCH wayland] wayland-server: Add a wl_resource_for_each_safe macro

2013-09-06 Thread Rob Bradford
From: Rob Bradford A version of wl_resource_for_each that is safe for iteration when items in the list are removed. --- src/wayland-server.h | 8 1 file changed, 8 insertions(+) diff --git a/src/wayland-server.h b/src/wayland-server.h index d77050d..c0365c0 100644 --- a/src/wayland

[PATCH weston 1/4] input: Use new wl_resource_for_each for sending updated seat caps

2013-09-06 Thread Rob Bradford
From: Rob Bradford --- src/input.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/input.c b/src/input.c index aa40b4e..e6d074e 100644 --- a/src/input.c +++ b/src/input.c @@ -398,8 +398,8 @@ weston_touch_destroy(struct weston_touch *touch) static void

WIP patches for multi resource using in place lists

2013-09-06 Thread Rob Bradford
As per your feedback i've dropped the per client list of resources stored in array indexed by a new client ID and replaced that with logic that munges the focussed resources from each list. The first three patches in the series were common with the previous solution. Unfortunately this last patch

[PATCH weston 4/4] input: Emit events on all resources for a client

2013-09-06 Thread Rob Bradford
From: Rob Bradford The Wayland protocol permits a client to request the pointer, keyboard and touch multiple times from the seat global. This is very useful in a component like Clutter-GTK where we are combining two libraries that use Wayland together. This change migrates the weston input

Re: [PATCH] autotools: Add configure summary

2013-08-14 Thread Rob Bradford
On 14 August 2013 04:48, Kristian Høgsberg wrote: > On Wed, Aug 14, 2013 at 03:13:53AM +0200, Armin K wrote: >> --- >> configure.ac | 43 ++- >> 1 file changed, 42 insertions(+), 1 deletion(-) > > That looks very nice, thanks. Cool patch - going to save me

Re: [PATCH weston 1/2] compositor: Implement release request for input interfaces

2013-08-14 Thread Rob Bradford
On 13 August 2013 20:11, Rob Bradford wrote: > +static void > +pointer_release(struct wl_client *client, struct wl_resource *resource) > +{ > + wl_resource_destroy(resource); > +} > + Wondering if we should also send leave events here if the pointer has a focus...The

[PATCH weston 2/2] window: Use new wl_pointer/keyboard_release request

2013-08-13 Thread Rob Bradford
From: Rob Bradford Since we bump the version we ask for from the compositor it is also necessary to implement the new "name" event in the seat listener. --- clients/window.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/clients/window.c

[PATCH weston 1/2] compositor: Implement release request for input interfaces

2013-08-13 Thread Rob Bradford
From: Kristian Høgsberg v2 (Rob Bradford): Update the version numbering for this change --- src/input.c | 37 - 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/input.c b/src/input.c index daa6e4c..caa0fcb 100644 --- a/src/input.c +++ b/src

[PATCH wayland 2/2] scanner: Emit wl_*_destroy stub even if interface has a destructor

2013-08-13 Thread Rob Bradford
From: Kristian Høgsberg If an interface has a destructor but no 'destroy' method we used to not emit a destroy method. Now with the fix for missing destroy requests for wl_pointer etc we need to emit the local wl_*_destroy always. --- src/scanner.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH wayland 1/2] protocol: Add release requests for wl_pointer, wl_keyboard, and wl_touch

2013-08-13 Thread Rob Bradford
tocol destructor so the name needs to be something else than wl_*_destroy. v2 (Rob Bradford): Rebased, bumped the protocol versions and added since attributes to the requests. --- protocol/wayland.xml | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/protocol/waylan

Destructors for pointer/keyboard/touch

2013-08-13 Thread Rob Bradford
Hi folks, One of the prerequisites for pointer lock support is the client being able to request the destruction of the client. Kristian wrote the patches below some time ago and i've rebased and bumped the versions appropriately. Unfortunately in order to maintain API we must call our destructor _

[PATCH wayland] wayland-server: Add a numerical id per client

2013-08-13 Thread Rob Bradford
From: Rob Bradford Assign each client a numerical id when the client is created for the display. We do not want the client ids to be sparse so that they can be used for space efficient lookups in the compositor; so when the client is destroyed we release the id either into the next counter if it

[PATCH weston 6/6] input: Use new wl_resource_for_each for sending updated seat caps

2013-08-13 Thread Rob Bradford
From: Rob Bradford --- src/input.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/input.c b/src/input.c index 396e35e..daa6e4c 100644 --- a/src/input.c +++ b/src/input.c @@ -458,8 +458,8 @@ weston_touch_destroy(struct weston_touch *touch) static void

[PATCH weston 5/6] input: Free the memory allocated to store the device resource lists

2013-08-13 Thread Rob Bradford
From: Rob Bradford v2: Walk the array manually as wl_array_for_each is bytewise we're storing pointers that we need to free. --- src/input.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/input.c b/src/input.c index 1fa3f48..396e35e 1

[PATCH weston 4/6] input: Emit events on all resources for a client

2013-08-13 Thread Rob Bradford
From: Rob Bradford The Wayland protocol permits a client to request the pointer, keyboard and touch multiple times from the seat global. This is very useful in a component like Clutter-GTK where we are combining two libraries that use Wayland together. This change migrates the weston input

[PATCH weston 3/6] data-device: Lookup drag resources using the focussed surface

2013-08-13 Thread Rob Bradford
From: Rob Bradford Rather than relying on focussed resource to get the client to lookup the drag resource with instead derive the client from the focussed surface. This is equivalent as the focussed resource is derived from the focussed surface in the weston_keyboard_set_focus function

[PATCH weston 2/6] input: Use a client id indexed array for input device resources

2013-08-13 Thread Rob Bradford
From: Rob Bradford Replace the list of resources per pointer/keyboard/touch with an array of pointers to lists of resources from that client. For compatability with the existing code find_resource_for_surface has been modified to return the resource associated with the first entry in the list

[PATCH weston 1/6] input: Use a client destroy listener for resetting the focus resource

2013-08-13 Thread Rob Bradford
From: Rob Bradford This is currently equivalent as there is no way for the pointer, keyboard or touch resource to be destroyed without the client being destroyed. This removes another place where a single resource for the focus is assumed. --- src/input.c | 12 ++-- 1 file changed, 6

Multiple input resource support (v2)

2013-08-13 Thread Rob Bradford
Hi folks, The wayland protocol lets you support multiple wl_pointer/wl_keyboard/wl_touch in a client - unfortunately Weston makes the assumption that there is only one input resource of a given class. These patches support the multiple resources and are a key step in the enabling of libraries like

Re: [PATCH web] building: add --with-cairo=gl to weston autogen step

2013-08-13 Thread Rob Bradford
On 13 August 2013 16:00, U. Artie Eoff wrote: > From: "U. Artie Eoff" > > The option --with-cairo=[image|gl|glesv2] was added to Weston's > configure and it defaults to --with-cairo=image. Since the > preceding instructions elude to compiling and using cairo-gl, > Weston needs to be configured t

[PATCH weston] build: Allow more control over cairo use in the clients

2013-08-09 Thread Rob Bradford
From: Rob Bradford Previously the configure script would silently disable the use of accelerated cairo in the clients if cairo-gl could not be found (or cairo-glesv2 if that was requested.) Conversely the use of cairo-gl would be automatically enabled if it was found with no way to disable that

[PATCH weston] weston-launch: Only pass non-NULL value into setenv()

2013-08-09 Thread Rob Bradford
From: Rob Bradford getenv() can return NULL is the key is not set, passing NULL into setenv() is an error --- src/weston-launch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/weston-launch.c b/src/weston-launch.c index 5b03094..7264f7e 100644 --- a/src/weston

Re: [PATCH wayland 1/2] text-backend: remove the weston_seat destruction listener on destroy

2013-07-30 Thread Rob Bradford
On 30 July 2013 00:41, Kristian Høgsberg wrote: > On Wed, Jul 24, 2013 at 04:57:32PM +0100, Rob Bradford wrote: >> From: Rob Bradford >> >> Prior to freeing the memory in which the link node for the signal is >> emedded we should remove the link node from the list

Re: [PATCH weston 04/11] compositor-fbdev: Avoid dereferencing a pointer in freed memory

2013-07-27 Thread Rob Bradford
On 27 July 2013 00:21, Bill Spitzak wrote: >> + device = output->device; >> fbdev_output_destroy(base); > > > Are you sure this does not free the memory that is now at *device? Maybe I missed something - can you point me at the code which makes you think it does? My

[PATCH weston 11/11] desktop-shell: Refactor launcher configuration reading to avoid leaking

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- clients/desktop-shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index eb550c8..ad324ba 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -1205,15 +1205,13

[PATCH weston 10/11] compositor-x11: Don't leak the looked up name for skipped outputs

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- src/compositor-x11.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 6baf522..4a73253 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -1525,8 +1525,10 @@ x11_compositor_create(struct

[PATCH weston 09/11] window: Free the allocated display if we fail to setup libxkbcommon

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- clients/window.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/clients/window.c b/clients/window.c index 8d956ae..d9f7d5a 100644 --- a/clients/window.c +++ b/clients/window.c @@ -4970,6 +4970,13 @@ display_create(int *argc, char *argv

[PATCH weston 08/11] tablet-shell: Avoid leaking the path on failed icon loading

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- clients/tablet-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/tablet-shell.c b/clients/tablet-shell.c index 3d5e79a..d7aac70 100644 --- a/clients/tablet-shell.c +++ b/clients/tablet-shell.c @@ -396,7 +396,6 @@ tablet_shell_add_launcher

[PATCH weston 07/11] image: Free filename saved into structure on error path

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- clients/image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clients/image.c b/clients/image.c index cbd466c..1f3c77c 100644 --- a/clients/image.c +++ b/clients/image.c @@ -373,6 +373,7 @@ image_create(struct display *display, const char *filename, if

[PATCH weston 06/11] compositor-drm: Use a format width parameter for the modeline sscanf

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- src/compositor-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index cf626ba..c7d6c04 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1673,7 +1673,7 @@ parse_modeline(const char *s

[PATCH weston 05/11] compositor-fbdev: Close fd used for re-enabling if that fails

2013-07-26 Thread Rob Bradford
From: Rob Bradford The device will be opened again in fbdev_output_create(). --- src/compositor-fbdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c index 36631f3..10ba7db 100644 --- a/src/compositor-fbdev.c +++ b/src/compositor-fbdev.c

[PATCH weston 04/11] compositor-fbdev: Avoid dereferencing a pointer in freed memory

2013-07-26 Thread Rob Bradford
From: Rob Bradford fbdev_output_destroy will free the memory passed into in and since we want to pass the device name into fbdev_output_create we need to save this to an intermediate value --- src/compositor-fbdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src

[PATCH weston 03/11] tty: Correctly check if the opening of the file descriptor failed

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- src/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.c b/src/tty.c index 2324f6c..38079a4 100644 --- a/src/tty.c +++ b/src/tty.c @@ -161,7 +161,7 @@ tty_create(struct weston_compositor *compositor, tty_vt_func_t vt_func

[PATCH weston 02/11] wcap-decode: Close file descriptor when destroying the decoder

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- wcap/wcap-decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wcap/wcap-decode.c b/wcap/wcap-decode.c index f7cabe3..2b9304d 100644 --- a/wcap/wcap-decode.c +++ b/wcap/wcap-decode.c @@ -144,6 +144,7 @@ void wcap_decoder_destroy(struct wcap_decoder *decoder

[PATCH weston 01/11] drm: close the drm file descriptor when the compositor is destroyed

2013-07-26 Thread Rob Bradford
From: Rob Bradford --- src/compositor-drm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 5a5d79c..cf626ba 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2260,6 +2260,8 @@ drm_destroy(struct weston_compositor *ec

Re: problem when running wayland

2013-07-25 Thread Rob Bradford
On 25 July 2013 13:55, M.hanny sabbagh wrote: > wl_global_create Was added in 4cffa0fd - you need to make sure the wayland you're linking to is new enough. Rob ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.

Re: [PATCH weston 5/6] input: Emit events on all resources for a client

2013-07-25 Thread Rob Bradford
Thanks for the feedback Daniel. > Implementation-wise, it mostly looks good, but - do we leak > focus_resource_list and friends when releasing? I can't find where > they're freed, but if you're freeing empty_list unconditionally, > you're going to have a bad time ... The list use here is kinda di

Re: [PATCH wayland 1/2] text-backend: remove the weston_seat destruction listener on destroy

2013-07-24 Thread Rob Bradford
The eagle eyed amongst you will notice these are patches for weston..whoops :-) Rob On 24 July 2013 16:57, Rob Bradford wrote: > From: Rob Bradford > > Prior to freeing the memory in which the link node for the signal is > emedded we should remove the link node from the list to

[PATCH wayland 2/2] clipboard: remove the weston_seat destruction listener on destroy

2013-07-24 Thread Rob Bradford
From: Rob Bradford Prior to freeing the memory in which the link node for the signal is emedded we should remove the link node from the list to prevent the list from being corrupted. https://bugs.freedesktop.org/show_bug.cgi?id=67231 --- src/clipboard.c | 1 + 1 file changed, 1 insertion

[PATCH wayland 1/2] text-backend: remove the weston_seat destruction listener on destroy

2013-07-24 Thread Rob Bradford
From: Rob Bradford Prior to freeing the memory in which the link node for the signal is emedded we should remove the link node from the list to prevent the list from being corrupted. https://bugs.freedesktop.org/show_bug.cgi?id=67231 --- src/text-backend.c | 1 + 1 file changed, 1 insertion

[PATCH weston v2] input: Free the memory allocated to store the device resource lists

2013-07-22 Thread Rob Bradford
From: Rob Bradford v2: Walk the array manually as wl_array_for_each is bytewise we're storing pointers that we need to free. --- src/input.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/input.c b/src/input.c index 25f2a3e..08b138c 1

[PATCH wayland 2/3] wayland-server: Add a wl_resource_for_each macro

2013-07-22 Thread Rob Bradford
From: Rob Bradford This macro allows you to correctly iterate through a list of resources handling the opaque nature of this type. --- src/wayland-server.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/wayland-server.h b/src/wayland-server.h index 5109530..6dbd68d 100644 --- a

[PATCH wayland 1/3] wayland-server: Add a numerical id per client

2013-07-22 Thread Rob Bradford
From: Rob Bradford Assign each client a numerical id when the client is created for the display. We do not want the client ids to be sparse so that they can be used for space efficient lookups in the compositor; so when the client is destroyed we release the id either into the next counter if it

Re: [PATCH weston 6/6] input: Free the memory allocated to store the device resource lists

2013-07-22 Thread Rob Bradford
Urgh - I misread the implementation of wl_array_for_each - I missed that it works bytewise through the array rather than sizeof(char *) steps. I'll follow-up with some patches to solve this. Rob On 22 July 2013 17:31, Rob Bradford wrote: > From: Rob Bradford > > --- >

[PATCH weston 1/6] input: For serial generation get the display from the compositor

2013-07-22 Thread Rob Bradford
From: Rob Bradford This removes the use of wl_client_get_display() where the client is derived from the focussed resource. This starts the removal of the assumption of a single resource on a client that would be notified about events on the focussed surface. --- src/bindings.c| 5

[PATCH wayland 3/3] wayland-client: Add wl_proxy_get_listener

2013-07-22 Thread Rob Bradford
From: Rob Bradford This is the mirror function to wl_proxy_add_listener and is useful inside client libraries to differentiate events on listeners for which multiple proxies have been created. --- src/wayland-client.c | 19 +++ src/wayland-client.h | 1 + 2 files changed, 20

[PATCH weston 6/6] input: Free the memory allocated to store the device resource lists

2013-07-22 Thread Rob Bradford
From: Rob Bradford --- src/input.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/input.c b/src/input.c index 25f2a3e..d4c28fb 100644 --- a/src/input.c +++ b/src/input.c @@ -366,10 +366,15 @@ weston_pointer_create(void) WL_EXPORT void

[PATCH weston 5/6] input: Emit events on all resources for a client

2013-07-22 Thread Rob Bradford
From: Rob Bradford The Wayland protocol permits a client to request the pointer, keyboard and touch multiple times from the seat global. This is very useful in a component like Clutter-GTK where we are combining two libraries that use Wayland together. This change migrates the weston input

[PATCH weston 4/6] data-device: Lookup drag resources using the focussed surface

2013-07-22 Thread Rob Bradford
From: Rob Bradford Rather than relying on focussed resource to get the client to lookup the drag resource with instead derive the client from the focussed surface. This is equivalent as the focussed resource is derived from the focussed surface in the weston_keyboard_set_focus function

[PATCH weston 2/6] input: Use a client destroy listener for resetting the focus resource

2013-07-22 Thread Rob Bradford
From: Rob Bradford This is currently equivalent as there is no way for the pointer, keyboard or touch resource to be destroyed without the client being destroyed. This removes another place where a single resource for the focus is assumed. --- src/input.c | 12 ++-- 1 file changed, 6

[PATCH weston 3/6] input: Use a client id indexed array for input device resources

2013-07-22 Thread Rob Bradford
From: Rob Bradford Replace the list of resources per pointer/keyboard/touch with an array of pointers to lists of resources from that client. For compatability with the existing code find_resource_for_surface has been modified to return the resource associated with the first entry in the list

Re: [PATCH weston] window: fix NULL pointer dereference

2013-07-16 Thread Rob Bradford
On 16 July 2013 01:25, Mariusz Ceier wrote: > > NULL pointer dereference happens when input->focus_widget == NULL > and input->grab == NULL. > I worry this is working around the problem rather than addressing the root cause. Why are we getting NULL for the focus_widget? What steps did you take t

[PATCH weston] window: Disregard motion events outside our current surface dimensions

2013-07-11 Thread Rob Bradford
From: Rob Bradford It is possible to receive a motion event that was generated by the compositor based on a pick of a surface of old dimensions. This was triggerable on toytoolkit clients when minimising. The new window dimensions were propagated through the widget hierarchy before the event was

[PATCH weston] editor: Support shift-left/right for selecting text

2013-07-11 Thread Rob Bradford
From: Rob Bradford If the shift modifier is active then we don't make the cursor and the anchor the same and as a result we develop a selection in the direction that the arrow key gets pressed in. https://bugs.freedesktop.org/show_bug.cgi?id=66802 --- clients/editor.c | 6 -- 1

[PATCH weston] shell: Respect output transformation for input panel surface

2013-07-11 Thread Rob Bradford
From: Rob Bradford Rather than using the dimensions in the mode we can use the recently added output width and height members which are updated to reflect any output rotation. https://bugs.freedesktop.org/show_bug.cgi?id=66798 --- src/shell.c | 7 ++- 1 file changed, 2 insertions(+), 5

[PATCH weston] window: Allow popup menu when the window is maximised

2013-07-11 Thread Rob Bradford
From: Rob Bradford https://bugs.freedesktop.org/show_bug.cgi?id=66793 --- clients/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c index cff7102..93a0a2c 100644 --- a/clients/window.c +++ b/clients/window.c @@ -2553,7 +2553,7

Re: [PATCH] wayland-client: Treat EOF when reading the wayland socket as an error

2013-07-09 Thread Rob Bradford
Hi Neil, On 9 July 2013 14:10, Neil Roberts wrote: > If EOF is encountered while reading from the Wayland socket, > wl_display_read_events() will now return -1 so that it will be treated > as an error. The documentation for this function states that it will > set errno when there is an error so i

[PATCH weston 3/3] tablet-shell: Avoid infinite loop when unlocking

2013-07-09 Thread Rob Bradford
From: Rob Bradford weston_compositor_wake will fire the signal that the unlock handler is setup as the listener for. Instead lets change the state to HOME which unlocks. --- src/tablet-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tablet-shell.c b/src/tablet

[PATCH weston 2/3] tablet-shell: Fix copy and paste error in unlock handler

2013-07-09 Thread Rob Bradford
From: Rob Bradford The signal handler was using the wrong member to find the containing structure of the unlock listener. https://bugs.freedesktop.org/show_bug.cgi?id=57637 --- src/tablet-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tablet-shell.c b/src

[PATCH weston 1/3] compositor: Make --modules always override other module loading

2013-07-09 Thread Rob Bradford
From: Rob Bradford This allows the test suite to strictly control the modules that get loaded by the compositor. https://bugs.freedesktop.org/show_bug.cgi?id=57636 --- man/weston.man | 3 ++- src/compositor.c | 11 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a

Re: [PATCH] xdg_shell: Add a new shell protocol.

2013-07-09 Thread Rob Bradford
he grab is over. Rob On 8 July 2013 19:04, Rafael Antognolli wrote: > On Mon, Jul 8, 2013 at 11:56 AM, Rob Bradford > wrote: >> If we're talking changes... >> >> Let's make the popup return an object with a done event on rather than >> stick the event in

[PATCH weston] input: remove seat global object when destroying the seat

2013-07-08 Thread Rob Bradford
From: Rob Bradford The RDP compositor dynamically creates and destroys seats for the different connecting clients. Althrough the memory for the seat was being freed and it was also being removed from the list of seats in the compositor the client was not being informed of that the seat was no

Re: [PATCH] Allow null surface arguments in wl_pointer.leave and wl_keyboard.leave

2013-07-08 Thread Rob Bradford
On 8 July 2013 17:25, Jason Ekstrand wrote: > That's exactly what weston *was* doing. However, thanks to the destroyed > proxies, the clients were getting NULL anyway. We could to go through a > bunch of trouble to keep the resource valid and call wl_pointer.leave on a > valid resource. Howeve

Re: [PATCH] xdg_shell: Add a new shell protocol.

2013-07-08 Thread Rob Bradford
If we're talking changes... Let's make the popup return an object with a done event on rather than stick the event in the interface like popup_done is. I'd also like to see us standardise on the naming of the request to create the new object - I think create_xdg_surface is better than get_xdg_sur

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Rob Bradford
rfaces get assigned as the pointer focus? That might be the thing to look at. Rob > > 2013/7/8 Rob Bradford >> >> Can you provide some more explanation in your commit message about why >> the pointer might have a surface focussed but that surface does not >> h

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Rob Bradford
Can you provide some more explanation in your commit message about why the pointer might have a surface focussed but that surface does not have a valid resource. (I'm wondering if this is fixing the symptom of a problem elsewhere.) Rob On 7 July 2013 16:38, Giulio Camuffo wrote: > seat->pointer-

Re: [PATCH] Allow null surface arguments in wl_pointer.leave and wl_keyboard.leave

2013-07-08 Thread Rob Bradford
*bump* This is a fix for: https://bugs.freedesktop.org/show_bug.cgi?id=65726&list_id=320167 Although it might be much better if we could emit the event (especially the leave) before we destroy the surface - that being said the destruction of the object will also result in the proxy being removed

Re: [PATCH weston] compositor: rebuild the global list if we've removed a surface from it

2013-07-08 Thread Rob Bradford
Hi Pekka, You raise a good point. I don't think the increase in complexity is worth it - we have good way to construct a surface list from the layers (and we do it at the start of every frame) anyway: I think it's nice that the management of this cache is really encapsulated in a single place. Ro

Re: [PATCH 8/8] shell: Fix calculation of center point in surface rotation

2013-07-02 Thread Rob Bradford
I think the change is correct but i'd like to see more explanation about the change in the commit message and the problem that it caused. Rob ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo

[PATCH weston] shell: Allow ending of popup grabs from within the starting of the grab

2013-06-26 Thread Rob Bradford
From: Rob Bradford Calling weston_pointer_start_grab can lead to a code path (in this case when the shell surface is unresponsive) that can try and remove the popup grab to setup a shell grab. Ending the popup grab requires removing the surface from the grab's surfaces list - however the

[PATCH weston] compositor: rebuild the global list if we've removed a surface from it

2013-06-26 Thread Rob Bradford
From: Rob Bradford The list of surfaces used by weston_compositor_pick_surface() is maintained in list of surfaces stored on the compositor. This list is generated from the surfaces across all the layers using weston_compositor_build_surface_list. When destroying a surface the surface is

[PATCH weston v2 4/4] man: Add documentation for output seat confining

2013-06-25 Thread Rob Bradford
From: Rob Bradford v2: Add some explanation about the default seat --- man/weston.ini.man | 9 + 1 file changed, 9 insertions(+) diff --git a/man/weston.ini.man b/man/weston.ini.man index c3e5747..9c22b3f 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -288,6 +288,15 @@ be

[PATCH weston v2 3/4] compositor-drm: Enable seat constraining when configured in weston.ini

2013-06-25 Thread Rob Bradford
From: Rob Bradford This change tweaks weston_pointer_clamp to take into consideration if a seat is constrained to a particular output by only considering the pointer position valid if it is within the output we a constrained to. This function is also used for the initial warping of the pointer

[PATCH weston v2 2/4] input: Add weston_pointer_clamp function to ensure pointer visible

2013-06-25 Thread Rob Bradford
From: Rob Bradford This refactors the code out from clip_pointer_motion into a function of its own which can then be used elsewhere to clamp the pointer coordinates to the range of the outputs. This change also makes the caller of clip_pointer_motion use this new function. --- src/compositor.h

[PATCH weston v2 1/4] udev-seat: Refactor out seat lookup and possible creation

2013-06-25 Thread Rob Bradford
From: Rob Bradford This change spills the code for looking up a seat by name and then potentially creating it if it doesn't exist into a new function called udev_seat_get_named. This change allows us to reuse this code when looking up the seat when parsing seat constraints per output. ---

[PATCH weston v3 3/3] build: Make libxkbcommon build-time optional in the compositor

2013-06-24 Thread Rob Bradford
From: Rob Bradford v2: Incorporate review feedback from Daniel Stone - improved configure message about the purpose of this option and reorganisation of #ifdefs. --- configure.ac | 15 ++- src/compositor.c | 2 +- src/input.c | 39 --- 3

[PATCH weston v3 2/3] input: Add support for making libxkbcommon optional

2013-06-24 Thread Rob Bradford
zero as the file descriptor - instead send the result of opening /dev/null v2 by Rob Bradford : the original version of the patch used a "raw_keycodes" flag instead of the "use_xkbcommon" used in this patch. v1: Reviewed-by: Singh, Satyeshwar v1: Reviewed-by:

[PATCH weston v3 1/3] toytoolkit: Allow operation without a keymap

2013-06-24 Thread Rob Bradford
From: Matt Roper In preparation for upcoming changes, we want to make sure that apps written with the toy toolkit continue to operate properly if no XKB keymap is received. If there's no XKB keymap, then we shouldn't try to figure out keyboard modifier states (since we probably don't even have e

[PATCH wayland v2] protocol: add no_keymap format to keymap formats

2013-06-24 Thread Rob Bradford
From: Rob Bradford This format is used to specify that the key button events received are not in relation to any key map and that the codes should be interpreted directly. v2: Use zero for the no keymap enum value and enhance the documentation for the enum entry. --- protocol/wayland.xml | 2

Re: [PATCH weston v2 3/3] build: Make libxkbcommon build-time optional in the compositor

2013-06-24 Thread Rob Bradford
On Sat, Jun 22, 2013 at 12:57:06AM +0100, Daniel Stone wrote: > And lastly, you need to bump the dependency on wayland to a version > which introduces the WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP enum. I don't think we've done this prior to release before. The expectation being if you run tip of weston

[PATCH weston v2 3/3] build: Make libxkbcommon build-time optional in the compositor

2013-06-21 Thread Rob Bradford
From: Rob Bradford --- configure.ac | 9 - src/compositor.c | 6 +- src/input.c | 20 +++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b625221..5e5e7bb 100644 --- a/configure.ac +++ b/configure.ac

[PATCH weston v2 2/3] input: Add support for making libxkbcommon optional

2013-06-21 Thread Rob Bradford
zero as the file descriptor - instead send the result of opening /dev/null v2 by Rob Bradford : the original version of the patch used a "raw_keycodes" flag instead of the "use_xkbcommon" used in this patch. v1: Reviewed-by: Singh, Satyeshwar v1: Reviewed-by:

[PATCH weston v2 1/3] toytoolkit: Allow operation without a keymap

2013-06-21 Thread Rob Bradford
From: Matt Roper In preparation for upcoming changes, we want to make sure that apps written with the toy toolkit continue to operate properly if no XKB keymap is received. If there's no XKB keymap, then we shouldn't try to figure out keyboard modifier states (since we probably don't even have e

[PATCH weston v2 3/3] build: Make libxkbcommon build-time optional in the compositor

2013-06-21 Thread Rob Bradford
From: Rob Bradford --- configure.ac | 9 - src/compositor.c | 6 +- src/input.c | 20 +++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b625221..5e5e7bb 100644 --- a/configure.ac +++ b/configure.ac

[PATCH weston v2 2/3] input: Add support for making libxkbcommon optional

2013-06-21 Thread Rob Bradford
zero as the file descriptor - instead send the result of opening /dev/null v2 by Rob Bradford : the original version of the patch used a "raw_keycodes" flag instead of the "use_xkbcommon" used in this patch. v1: Reviewed-by: Singh, Satyeshwar v1: Reviewed-by:

[PATCH weston v2 1/3] toytoolkit: Allow operation without a keymap

2013-06-21 Thread Rob Bradford
From: Matt Roper In preparation for upcoming changes, we want to make sure that apps written with the toy toolkit continue to operate properly if no XKB keymap is received. If there's no XKB keymap, then we shouldn't try to figure out keyboard modifier states (since we probably don't even have e

[PATCH weston 3/3] build: Make libxkbcommon build-time optional in the compositor

2013-06-14 Thread Rob Bradford
From: Rob Bradford --- configure.ac | 9 - src/compositor.c | 6 +- src/input.c | 20 +++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b625221..5e5e7bb 100644 --- a/configure.ac +++ b/configure.ac

[PATCH weston 2/3] input: Add support for making libxkbcommon optional

2013-06-14 Thread Rob Bradford
27;key' event rather than using xkb keysym mapping. Whether to use xkbcommon is a global option that applies to all compositor keyboard devices on the system; it is an all-or-nothing flag. This patch simply adds conditional checks on whether xkbcommon is to be used or not. v2 by Rob Bradfo

[PATCH weston 1/3] toytoolkit: Allow operation without a keymap

2013-06-14 Thread Rob Bradford
From: Matt Roper In preparation for upcoming changes, we want to make sure that apps written with the toy toolkit continue to operate properly if no XKB keymap is received. If there's no XKB keymap, then we shouldn't try to figure out keyboard modifier states (since we probably don't even have e

[PATCH wayland] protocol: add no_keymap format to keymap formats

2013-06-14 Thread Rob Bradford
From: Rob Bradford This format is used to specify that the key button events received are not in relation to any key map and that the codes should be interpreted directly. --- protocol/wayland.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol/wayland.xml b/protocol/wayland.xml

Re: [PATCH weston 3/4] compositor-drm: Enable seat constraining when configured in weston.ini

2013-06-13 Thread Rob Bradford
On Tue, Jun 11, 2013 at 03:33:46PM +0300, Pekka Paalanen wrote: > Hi Rob, > > I think patches 2, 3, and 4 should be all squashed, and I would like to > know more of what is the use case here. > > More questions below. > > > On Mon, 10 Jun 2013 15:17:30 +0100 > Ro

[PATCH wayland 2/2] protocol: Add missing since attribute for name event on wl_seat

2013-06-12 Thread Rob Bradford
From: Rob Bradford This event was added in version 2 of the protocol. --- protocol/wayland.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index f5d08b5..3d4ec9b 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml

[PATCH wayland 1/2] build: Fix warning message on syscall failures

2013-06-12 Thread Rob Bradford
From: Rob Bradford --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 7f3a694..7ca70da 100644 --- a/configure.ac +++ b/configure.ac @@ -42,13 +42,13 @@ AC_SUBST(GCC_CFLAGS) AC_CHECK_FUNCS([accept4 mkostemp

Re: [PATCH weston 2/4] input: Add a weston_pointer_output_center

2013-06-12 Thread Rob Bradford
On Tue, Jun 11, 2013 at 03:08:23PM +0300, Pekka Paalanen wrote: > On Mon, 10 Jun 2013 15:17:29 +0100 > Rob Bradford wrote: > > > From: Rob Bradford > > > > Centre the pointer on a the provided output. This function provides the > > basis of ensuring that the

[PATCH weston 4/4] man: Add documentation for output seat confining

2013-06-10 Thread Rob Bradford
From: Rob Bradford --- man/weston.ini.man | 8 1 file changed, 8 insertions(+) diff --git a/man/weston.ini.man b/man/weston.ini.man index c3e5747..93bd982 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -288,6 +288,14 @@ be one of the following 8 strings: .BR "fl

[PATCH weston 3/4] compositor-drm: Enable seat constraining when configured in weston.ini

2013-06-10 Thread Rob Bradford
From: Rob Bradford --- src/compositor-drm.c | 16 src/compositor.h | 2 ++ src/input.c | 2 ++ src/udev-seat.c | 3 +++ 4 files changed, 23 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 76d0810..7d33977 100644 --- a/src

[PATCH weston 2/4] input: Add a weston_pointer_output_center

2013-06-10 Thread Rob Bradford
From: Rob Bradford Centre the pointer on a the provided output. This function provides the basis of ensuring that the pointer starts on the output when we start to constrain a seat to a given output. --- src/compositor.h | 3 +++ src/input.c | 8 2 files changed, 11 insertions

[PATCH weston 1/4] udev-seat: Refactor out seat lookup and possible creation

2013-06-10 Thread Rob Bradford
From: Rob Bradford This change spills the code for looking up a seat by name and then potentially creating it if it doesn't exist into a new function called udev_seat_get_named. This change allows us to reuse this code when looking up the seat when parsing seat constraints per output. ---

  1   2   3   >