[PATCH] server: Add an API to get the socket fd for a client

2016-01-11 Thread Sung-Jin Park
This adds an API to get the socket fd for a client. The client socket fd can be used for a wayland compositor to validate a request from a client. For instance, this will be helpful in some linux distributions, in which SELinux or SMACK is enabled. In those environments, each file (including

Re: [PATCH v3 weston 2/2] Support axis source, axis discrete, frame and axis stop events

2016-01-11 Thread Jonas Ådahl
On Tue, Jan 12, 2016 at 09:05:40AM +1000, Peter Hutterer wrote: > On Mon, Jan 11, 2016 at 03:59:56PM +0800, Jonas Ådahl wrote: > > On Tue, Dec 08, 2015 at 11:15:01AM +1000, Peter Hutterer wrote: > > > Signed-off-by: Peter Hutterer > > > > Looks correct to me, so

[PATCH v2] server: Calculate remaining data size after a closure is processed

2016-01-11 Thread Jaeyoon Jung
When processing a closure, data in the connection can be consumed again if the closure itself invokes extra event dispatch. In that case the remaining data size is also altered, so the variable len should be updated after the closure is processed. Signed-off-by: Jaeyoon Jung

Re: [PATCH v3 weston 2/2] Support axis source, axis discrete, frame and axis stop events

2016-01-11 Thread Peter Hutterer
On Mon, Jan 11, 2016 at 03:59:56PM +0800, Jonas Ådahl wrote: > On Tue, Dec 08, 2015 at 11:15:01AM +1000, Peter Hutterer wrote: > > Signed-off-by: Peter Hutterer > > Looks correct to me, so consider this (and the previous patch) > Reviewed-by: Jonas Ådahl

Re: [PATCH wayland v8 2/2] protocol: Add DnD actions

2016-01-11 Thread Jonas Ådahl
On Thu, Dec 24, 2015 at 03:21:11AM +0100, Carlos Garnacho wrote: > These 2 requests have been added: > > - wl_data_source.set_actions: Notifies the compositor of the available > actions on the data source. > - wl_data_offer.set_actions: Notifies the compositor of the available > actions on

Re: [PATCH v3 weston 2/2] Support axis source, axis discrete, frame and axis stop events

2016-01-11 Thread Jonas Ådahl
On Tue, Dec 08, 2015 at 11:15:01AM +1000, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer Looks correct to me, so consider this (and the previous patch) Reviewed-by: Jonas Ådahl . I do, however, have some comments on the overall design inlined

Re: [PATCH weston] compositor: create_data_source(): Fix potential crash on OOM

2016-01-11 Thread Marek Chalupa
Hi, Reviewed-by: Marek Chalupa (one small comment below) Cheers, Marek On 01/05/2016 05:18 PM, Lyude wrote: Noticed this while working on primary selection, in the event we run out of memory when trying to create a new data source, there's a chance we'll fail on

Re: [PATCH wayland 2/6] scanner: Fail if 'since' is higher than the interface version

2016-01-11 Thread Marek Chalupa
Hi, patches 1-2 Reviewed-by: Marek Chalupa Cheers, Marek On 12/29/2015 03:10 AM, Jonas Ådahl wrote: If an event or request have a "since" attribute that is larger than the version of the interface it is in, fail with an explaining error message. Signed-off-by: Jonas

Re: [PATCH wayland 3/6] Use zalloc instead of malloc + memset

2016-01-11 Thread Marek Chalupa
Hi, On 12/29/2015 03:10 AM, Jonas Ådahl wrote: Signed-off-by: Jonas Ådahl --- src/connection.c | 4 ++-- src/wayland-client.c | 12 +++- src/wayland-private.h | 6 ++ src/wayland-server.c | 6 ++ src/wayland-shm.c | 4 +--- 5 files

Re: [PATCH wayland v4] server: Add a socket with an existing fd

2016-01-11 Thread Marek Chalupa
On 12/18/2015 02:08 AM, Bryce Harrington wrote: This adds functionality to allow system-level control over handing out file descriptors for sockets, to allow tighter security when running a Wayland compositor under a Wayland session server. Signed-off-by: Bryce Harrington

Re: [PATCH weston v5 1/5] data-device: Implement DnD progress notification

2016-01-11 Thread Jonas Ådahl
On Thu, Dec 24, 2015 at 03:23:43AM +0100, Carlos Garnacho wrote: > Weston now sends wl_data_source.dnd_drop_performed and .dnd_finished in > order to notify about the different phases of DnD. > > wl_data_source.cancelled is also used as mentioned in the docs, being > emitted also on DnD when the

[PATCH] server: Calculate remainig data size after a closure is processed

2016-01-11 Thread Jaeyoon Jung
While processing a closure, data in the connection can be consumed again if the closure itself invokes extra event dispatch. In that case the remaining data size is also altered as a result. So we should update len variable with the correct value after the closure is processed. Signed-off-by:

Re: [PATCH wayland 2/2] protocol: Add DnD actions

2016-01-11 Thread Michal Suchanek
On 24 December 2015 at 01:58, Carlos Garnacho wrote: > @@ -757,6 +883,40 @@ > > > > + > + > + > + > + > +This is a bitmask of the available/preferred actions in a > +drag-and-drop operation. > + > +In the compositor,

Re: [PATCH wayland] client: Add missing arg in a wl_log invocation

2016-01-11 Thread Marek Chalupa
Hi, obviously correct Reviewed-by: Marek Chalupa Cheers, Marek On 01/04/2016 11:09 AM, Victor Berger wrote: Without this 'proxy' argument, the '%p' formatter prints a constant garbage value. Signed-off-by: Victor Berger ---

[PATCH wayland v2] server: don't send an error to NULL display_resource

2016-01-11 Thread Marek Chalupa
if display_resource = wl_resource_create() fails in bind_display(), we call wl_client_post_no_memory() which is wrong, since this function uses display_resource (which is NULL at this point). said simply: don't send an error to resource that you've just failed to create)

Re: [PATCH weston 2/5] data-device: Implement DnD actions

2016-01-11 Thread Jonas Ådahl
On Thu, Dec 24, 2015 at 02:00:38AM +0100, Carlos Garnacho wrote: > The policy in weston in order to determine the chosen DnD action is > deliberately simple, and is probably the minimals that any compositor > should be doing here. > > Besides honoring the set_actions requests on both

Re: [PATCH wayland 6/6] doc: Fix incorrect parameter name

2016-01-11 Thread Marek Chalupa
Reviewed-by: Marek Chalupa On 12/29/2015 03:10 AM, Jonas Ådahl wrote: e a shm_pool ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: [PATCH v2 libinput] evdev: only reject devices with missing MT x/y if they're MT devices

2016-01-11 Thread Hans de Goede
Hi, On 08-01-16 01:51, Peter Hutterer wrote: A fake MT device may have ABS_MT_POSITION_X but not Y. In this case we don't care, because we don't handle those axes anyway. http://bugs.freedesktop.org/show_bug.cgi?id=93474 Signed-off-by: Peter Hutterer Looks good to

Re: [PATCH wayland 1/6] scanner: Add missing brackets

2016-01-11 Thread Jonas Ådahl
On Mon, Jan 11, 2016 at 01:04:50PM -0600, Derek Foreman wrote: > On 28/12/15 08:10 PM, Jonas Ådahl wrote: > > A statement was added at the same indentation level as the true branch > > of the if statement, but since there were no brackets, it would be > > executed independently of the result of

Re: [PATCH wayland-protocols v2 2/2] Introduce pointer locking and confinement protocol

2016-01-11 Thread Jonas Ådahl
On Tue, Jan 12, 2016 at 02:48:38PM +0800, Jonas Ådahl wrote: > On Sat, Jan 09, 2016 at 04:38:51PM +, Daniel Stone wrote: > > Hi, > > > > On 4 January 2016 at 04:21, Peter Hutterer wrote: > > > On Fri, Jan 01, 2016 at 04:54:14PM +, Daniel Stone wrote: > > >> I

RE: [PATCH v2] server: Calculate remaining data size after a closure is processed

2016-01-11 Thread Jaeyoon Jung
> -Original Message- > From: wayland-devel [mailto:wayland-devel-boun...@lists.freedesktop.org] On > Behalf Of Jonas Adahl > Sent: Tuesday, January 12, 2016 12:27 PM > To: Jaeyoon Jung > Cc: wayland-devel@lists.freedesktop.org > Subject: Re: [PATCH v2] server: Calculate remaining data size

Re: [PATCH wayland-protocols v2 2/2] Introduce pointer locking and confinement protocol

2016-01-11 Thread Jonas Ådahl
On Sat, Jan 09, 2016 at 04:38:51PM +, Daniel Stone wrote: > Hi, > > On 4 January 2016 at 04:21, Peter Hutterer wrote: > > On Fri, Jan 01, 2016 at 04:54:14PM +, Daniel Stone wrote: > >> I almost wonder if we couldn't make peoples' lives easier by merging > >>

[PATCH v3] server: Calculate remaining data size after a closure is processed

2016-01-11 Thread Jaeyoon Jung
When processing a closure, data in the connection can be consumed again if the closure itself invokes extra event dispatch. In that case the remaining data size is also altered, so the variable len should be updated after the closure is processed. Signed-off-by: Jaeyoon Jung

Re: [PATCH wayland 3/6] Use zalloc instead of malloc + memset

2016-01-11 Thread Jonas Ådahl
On Mon, Jan 11, 2016 at 10:50:36AM +0100, Marek Chalupa wrote: > Hi, > > On 12/29/2015 03:10 AM, Jonas Ådahl wrote: > >Signed-off-by: Jonas Ådahl > >--- > > src/connection.c | 4 ++-- > > src/wayland-client.c | 12 +++- > > src/wayland-private.h | 6 ++ > >

Re: [PATCH v2] server: Calculate remaining data size after a closure is processed

2016-01-11 Thread Jonas Ådahl
On Tue, Jan 12, 2016 at 08:22:56AM +0900, Jaeyoon Jung wrote: > When processing a closure, data in the connection can be consumed again > if the closure itself invokes extra event dispatch. In that case the > remaining data size is also altered, so the variable len should be > updated after the

[PATCH wayland v2] client: Fully flush during blocking dispatch

2016-01-11 Thread Jonas Ådahl
wl_display_flush() may fail with EAGAIN which means that not all data waiting in the buffer has been flushed. We later block until there data to read, which could mean that we block on input from the compositor without having sent out all data from the client. Avoid this by fully flushing the

Re: [PATCH wayland 1/2] protocol: Improve data source notification around DnD progress

2016-01-11 Thread Jonas Ådahl
On Mon, Jan 11, 2016 at 05:39:20PM +0100, Carlos Garnacho wrote: > Hi Pekka!, > > On Tue, Jan 5, 2016 at 9:50 AM, Pekka Paalanen wrote: > > On Wed, 23 Dec 2015 12:31:16 +0100 > > Carlos Garnacho wrote: > > > >> Hey, > >> > >> On Wed, Dec 23, 2015 at 5:47

[PATCH] server: Add an API to get the socket fd for a client

2016-01-11 Thread 박성진
>From 3bdb494aa2be26ed2b8ba9115994fd5f4939d5fa Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Mon, 11 Jan 2016 18:51:21 +0900 Subject: [PATCH] server: Add an API to get the socket fd for a client This adds an API to get the socket fd for a client. The client

[PATCH 0/3] Make important key bindings easily on-and-off-able

2016-01-11 Thread Bob Ham
Allow various sets of key combinations, most importantly Ctrl-Alt-Fn and Ctrl-Alt-Backspace to be disabled from weston.ini. Bob Ham (3): compositor-{drm,fbdev,rpi}: Make VT switching configurable desktop-shell: Make zapping configurable desktop-shell: Allow binding-modifier weston.ini

[PATCH 1/3] compositor-{drm, fbdev, rpi}: Make VT switching configurable

2016-01-11 Thread Bob Ham
Add a new boolean weston.ini option, "vt-switching" to enable or disable Ctrl-Alt-Fn key combinations. Signed-off-by: Bob Ham --- Makefile.am | 4 +++- man/weston.ini.man | 6 ++ src/compositor-drm.c| 16 ++-- src/compositor-fbdev.c

[PATCH 3/3] desktop-shell: Allow binding-modifier weston.ini option to be none

2016-01-11 Thread Bob Ham
Allow the binding-modifier option in weston.ini to take a value of "none", meaning that none of the usual Super+Tab, Super+K, Super+Fn, etc. key bindings will be enabled. Signed-off-by: Bob Ham --- desktop-shell/shell.c | 26 ++ man/weston.ini.man

Re: [PATCH 3/3] desktop-shell: Allow binding-modifier weston.ini option to be none

2016-01-11 Thread Derek Foreman
On 11/01/16 09:41 AM, Bob Ham wrote: > Allow the binding-modifier option in weston.ini to take a value of > "none", meaning that none of the usual Super+Tab, Super+K, Super+Fn, > etc. key bindings will be enabled. > > Signed-off-by: Bob Ham Reviewed-by: Derek Foreman

[PATCH weston v3 3/5] clients: rename simple-dmabuf into simple-dmabuf-intel

2016-01-11 Thread Emmanuel Gil Peyrot
This client was using an Intel-specific way to allocate a dmabuf, so it makes sense to have that in its name. Signed-off-by: Emmanuel Gil Peyrot Reviewed-by: Pekka Paalanen Reviewed-by: Daniel Stone

[PATCH weston v3 4/5] clients: Fix a few issues in simple-dmabuf-intel

2016-01-11 Thread Emmanuel Gil Peyrot
Those were found while working on simple-dmabuf-v4l, as found in the next patch of this series. After each buffer’s params were ready to be submitted to the compositor, a roundtrip was done, which is wasteful since we can do it only once after having queued all the params we want. Removing those

[PATCH weston v3 5/5] clients: add simple-v4l-dmabuf client

2016-01-11 Thread Emmanuel Gil Peyrot
This client opens a V4L2 device, usually exposed as /dev/videoN, and retrieves its frames as dmabuf for later import into the compositor. It supports both single- and multi-planar devices, and any format exposed by the V4L2 device the Wayland compositor accepts. This client never changes the

[PATCH weston v3 2/5] gl-renderer: Add support for a few YUV dmabuf formats

2016-01-11 Thread Emmanuel Gil Peyrot
Namely the single-planar YUYV, the two-planar NV12, and the three-planar YUV420, using the shaders already present in Weston. Signed-off-by: Emmanuel Gil Peyrot Reviewed-by: Derek Foreman Maniphest Tasks: T13 Differential Revision:

Re: [PATCH wayland 1/6] scanner: Add missing brackets

2016-01-11 Thread Derek Foreman
On 28/12/15 08:10 PM, Jonas Ådahl wrote: > A statement was added at the same indentation level as the true branch > of the if statement, but since there were no brackets, it would be > executed independently of the result of the if condition. > > Signed-off-by: Jonas Ådahl

[PATCH weston v3 1/5] gl-renderer: introduce a new struct dmabuf_image

2016-01-11 Thread Emmanuel Gil Peyrot
This struct serves as renderer data for linux-dmabuf buffers, and can contain multiple struct egl_image, simplifying this latter in the common non-dmabuf case. Signed-off-by: Emmanuel Gil Peyrot Reviewed-by: Pekka Paalanen

Re: [PATCH 2/3] desktop-shell: Make zapping configurable

2016-01-11 Thread Derek Foreman
On 11/01/16 09:41 AM, Bob Ham wrote: > Add a new boolean weston.ini option, "zap" to enable or disable the > Ctrl-Alt-Backspace key combination. > > Signed-off-by: Bob Ham > --- > desktop-shell/shell.c | 14 +++--- > desktop-shell/shell.h | 1 + >

Re: [PATCH 1/3] compositor-{drm, fbdev, rpi}: Make VT switching configurable

2016-01-11 Thread Derek Foreman
On 11/01/16 09:41 AM, Bob Ham wrote: > Add a new boolean weston.ini option, "vt-switching" to enable or > disable Ctrl-Alt-Fn key combinations. > > Signed-off-by: Bob Ham > --- > Makefile.am | 4 +++- > man/weston.ini.man | 6 ++ >

Re: [PATCH wayland v2] server: don't send an error to NULL display_resource

2016-01-11 Thread Bill Spitzak
I like this minimal fix better than the previous one that fixed the bug twice. I think it would be clearer to just state that "wl_resource_post_error will crash if display_resource is null". On Mon, Jan 11, 2016 at 9:33 AM, Derek Foreman wrote: > On 11/01/16 04:45 AM,

Re: [PATCH v3 weston 2/2] Support axis source, axis discrete, frame and axis stop events

2016-01-11 Thread Bill Spitzak
On Sun, Jan 10, 2016 at 11:59 PM, Jonas Ådahl wrote: > > > + widget_pointer_frame_handler_t pointer_frame_handler; > > + widget_axis_source_handler_t axis_source_handler; > > + widget_axis_stop_handler_t axis_stop_handler; > > + widget_axis_discrete_handler_t

Re: [PATCH weston 2/5] data-device: Implement DnD actions

2016-01-11 Thread Bill Spitzak
Can you please explain in detail the difference between the actions being "COPY + MOVE" and being "COPY + MOVE + ASK". I do not at all understand the purpose of "ASK". It might also help to specify what should happen if ASK is combined with less than 2 other actions. On Mon, Jan 11, 2016 at 12:30

Re: [PATCH weston v3 5/5] clients: add simple-v4l-dmabuf client

2016-01-11 Thread Derek Foreman
On 11/01/16 01:20 PM, Derek Foreman wrote: > On 11/01/16 01:04 PM, Emmanuel Gil Peyrot wrote: >> This client opens a V4L2 device, usually exposed as /dev/videoN, and >> retrieves its frames as dmabuf for later import into the compositor. >> >> It supports both single- and multi-planar devices, and

Re: libinput: Disable tap-and-drag

2016-01-11 Thread Bill Spitzak
The timeout can be avoided by sending tap+drag as press/release/(wait)/press/drag. I don't have it here to test but I remember hearing this is what some (all?) mac implementations do. This requires libinput to also decide whether a click is a "double click" or not, the fact that our software was

Re: [PATCH weston v3 5/5] clients: add simple-v4l-dmabuf client

2016-01-11 Thread Derek Foreman
On 11/01/16 01:04 PM, Emmanuel Gil Peyrot wrote: > This client opens a V4L2 device, usually exposed as /dev/videoN, and > retrieves its frames as dmabuf for later import into the compositor. > > It supports both single- and multi-planar devices, and any format > exposed by the V4L2 device the