Re: [RFC weston] Add a release_type argument to weston_buffer_reference

2013-12-03 Thread Bill Spitzak
On 12/03/2013 10:35 PM, Pekka Paalanen wrote: On Tue, 03 Dec 2013 11:30:08 -0800 Bill Spitzak wrote: What about my idea of sending the release immediately if and only if another event has been (or is being) sent since the buffer was replaced? That is how it already works, and that is not eno

Re: [PATCH 1/3] shell: restore app on non default and unplugged output

2013-12-03 Thread Ander Conselvan de Oliveira
On 12/04/2013 07:17 AM, Zhang, Xiong Y wrote: Hi, Ander: Thanks for your review. Your idea is feasible. To achieve that, we could add an output_destroyed() function pointer in weston_surface But I think we could add an output_destroyed() function pointer in weston_view not in Weston_surfa

[PATCH v4] pixman: Destroy pixman images when underlying buffer is destroyed

2013-12-03 Thread Lubomir Rintel
While the pixman image might be attached, the underlying buffer might be already gone under certain circumstances. This is easily reproduced by attempting to resize gnome-terminal on a fbdev backend. $ WAYLAND_DEBUG=1 strace -emunmap weston --backend=fbdev-backend.so ... [1524826.942] wl_shm@7.cre

Re: RFC: surface crop and scale protocol extension

2013-12-03 Thread Pekka Paalanen
On Thu, 28 Nov 2013 12:52:15 +0100 Jonny Lamb wrote: > Il giorno mar, 26/11/2013 alle 18.19 +0100, Jonny Lamb ha scritto: > > This is the initial version of the weston implementation of the > > wl_scaler protocol extension for surface cropping and scaling. It is > > based on the extension RFC ver

Re: [PATCH weston 4/8] protocol: crop & scale RFC v3

2013-12-03 Thread Pekka Paalanen
On Fri, 29 Nov 2013 10:20:18 +0200 Pekka Paalanen wrote: > On Fri, 29 Nov 2013 01:51:03 + > Daniel Stone wrote: > > > Hi, > > > > On 26 November 2013 17:19, Jonny Lamb > > wrote: > > > + > > > + > > > + > > > + > > > > In the same vein as my reply to Bill, I'd rea

Re: [PATCH weston] compositor: add a masking mechanism to weston_view

2013-12-03 Thread Pekka Paalanen
On Tue, 3 Dec 2013 14:29:21 +0100 Giulio Camuffo wrote: > This adds a 'mask' pixman_region32 to weston_view and to > weston_view::geometry. A user, a shell probably, can set a view's > mask to some region (e.g. the workspace area) and the view, and all > its transform children, will be clipped t

Re: [RFC weston] Add a release_type argument to weston_buffer_reference

2013-12-03 Thread Pekka Paalanen
On Tue, 03 Dec 2013 11:30:08 -0800 Bill Spitzak wrote: > What about my idea of sending the release immediately if and only if > another event has been (or is being) sent since the buffer was > replaced? That is how it already works, and that is not enough here. Note: not "replaced" but "release

RE: [PATCH 1/3] shell: restore app on non default and unplugged output

2013-12-03 Thread Zhang, Xiong Y
Hi, Ander: Thanks for your review. Your idea is feasible. >> To achieve that, we could add an output_destroyed() function pointer in >> weston_surface But I think we could add an output_destroyed() function pointer in weston_view not in Weston_surface, because as Jason's idea one surface may h

[RFC weston] make client isolation optional

2013-12-03 Thread Sebastian Wick
This patch allows wayland clients to use protocols which give away information about other clients without being started by the compositor. The reason to denie access on those protocols is to make sure no information about the clients is leaked to other clients (=security). I think that we don't

Re: [PATCH xwayland 3/3] Check if the frame exists before reading its size

2013-12-03 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 11:24:03AM +0100, Axel Davy wrote: > You were faster than me! > > I was just about sending this very same patch. > > The patch is correct as I was explaining in my commit message: > "XWayland: Don't access the frame field for unmapped windows. > > There are situations

Re: [PATCH] XWayland: do not set wm->focus_window to a window with no frame

2013-12-03 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 02:04:38PM +0100, Axel Davy wrote: > An unmapped window shouldn't be the input focus. > This solves some remaining Weston crashes with XWayland, > because we assume wm->focus_window has a frame. No, the original patch from Dima is fine, not having a frame doesn't mean you c

Re: [PATCH 04/16] xdg-shell: Implement part of the interface.

2013-12-03 Thread Kristian Høgsberg
On Tue, Dec 3, 2013 at 9:45 AM, Rafael Antognolli wrote: > On Fri, Nov 29, 2013 at 9:29 PM, Kristian Høgsberg > wrote: >> On Wed, Nov 27, 2013 at 03:50:20PM -0200, Rafael Antognolli wrote: >>> Basic requests are implemented, enough to get a surface displayed. >>> --- >>> src/.gitignore | 2 +

[PATCH] Add a FreeRds backend

2013-12-03 Thread Hardening
FreeRDS is a FreeRDP based RDP server, the server handles incoming connections and talks RDP with the peers. FreeRds cooperates with an "out-service": the out-service creates the content to display, and FreeRds will take care of encoding the content in the appropriate format (bitmapUpdate, remot

Re: [PATCH weston] data-device: Fix surface configure function type

2013-12-03 Thread Kristian Høgsberg
On Tue, Dec 03, 2013 at 10:30:17PM +0100, Jonas Ådahl wrote: > The commit "Remove the weston_view.geometry.width/height fields" changed > the type of the surface configure callback function, but did not change > the callbacks in data-device.c. This commit fixes the type of the > functions left need

Re: [PATCH] logind: delay wakeup until DRM-device is resumed

2013-12-03 Thread Kristian Høgsberg
On Sat, Nov 30, 2013 at 2:25 AM, David Herrmann wrote: > The logind API was designed to allow any kind of devices and any number of > devices. It has no idea of "main DRM device" or similar. However, the > weston DRM backend was designed with a single DRM device as master. > Therefore, we wake it

[PATCH weston] data-device: Fix surface configure function type

2013-12-03 Thread Jonas Ådahl
The commit "Remove the weston_view.geometry.width/height fields" changed the type of the surface configure callback function, but did not change the callbacks in data-device.c. This commit fixes the type of the functions left needed to be changed. Signed-off-by: Jonas Ådahl --- src/data-device.c

Re: [RFC weston] Add a release_type argument to weston_buffer_reference

2013-12-03 Thread Bill Spitzak
What about my idea of sending the release immediately if and only if another event has been (or is being) sent since the buffer was replaced? In my software I want a free buffer soon after user input events such as mouse clicks, because I want to draw the result of that mouse click. I do not w

Re: [PATCH] Add wl_dmabuf protocol

2013-12-03 Thread Axel Davy
On 03/12/2013, benjamin.gaign...@linaro.org wrote : Here are a few comments: + + What's the point of creating a new interface, and skipping version 1? You should have removed too the since="2" you have in some functions. + + + +Bitmask of capabilities. + + +

Re: [PATCH 04/16] xdg-shell: Implement part of the interface.

2013-12-03 Thread Rafael Antognolli
On Fri, Nov 29, 2013 at 9:29 PM, Kristian Høgsberg wrote: > On Wed, Nov 27, 2013 at 03:50:20PM -0200, Rafael Antognolli wrote: >> Basic requests are implemented, enough to get a surface displayed. >> --- >> src/.gitignore | 2 + >> src/Makefile.am | 6 +- >> src/shell.c | 228 >> +++

[PATCH] Add wl_dmabuf protocol

2013-12-03 Thread benjamin . gaignard
From: Benjamin Gaignard This protocol is widely derivated of wl_drm protocol but without unneeded function like flink or authentification. It allow to use a dmabuf file descriptor in a wayland protocol which could be useful in case we don't have (or can't use) Mesa EGL. Signed-off-by: Benjamin G

Re: [PATCH 03/16] shell: Change set_maximized to receive internal structures.

2013-12-03 Thread Rafael Antognolli
On Fri, Nov 29, 2013 at 9:02 PM, Kristian Høgsberg wrote: > On Wed, Nov 27, 2013 at 03:50:19PM -0200, Rafael Antognolli wrote: >> Change the parameters of set_maximized from wl_resource and wl_client to >> shell_surface and weston_output. This will allow it to be used with >> xdg-shell too. >> ---

Re: [PATCH 02/16] shell: Remove SHELL_SURFACE_FULLSCREEN and SHELL_SURFACE_MAXIMIZED.

2013-12-03 Thread Rafael Antognolli
All done. On Fri, Nov 29, 2013 at 9:00 PM, Kristian Høgsberg wrote: > On Wed, Nov 27, 2013 at 03:50:18PM -0200, Rafael Antognolli wrote: >> These surface types don't exist anymore inside weston desktop shell >> implementation. They are just exposed as wl_shell surface types, but >> internally the

Re: [PATCH 06/16] xdg-shell: Implement set_transient_for request.

2013-12-03 Thread Rafael Antognolli
On Fri, Nov 29, 2013 at 9:39 PM, Kristian Høgsberg wrote: > On Wed, Nov 27, 2013 at 03:50:22PM -0200, Rafael Antognolli wrote: >> The implementation just sets a parent/child relationship between the >> xdg_surface and its parent, passed as argument of this request. Stacking >> might be affected (t

Re: [PATCH 00/16] xdg-shell protocol, implementation and port of toytoolkit.

2013-12-03 Thread Rafael Antognolli
On Fri, Nov 29, 2013 at 9:54 PM, Kristian Høgsberg wrote: > On Fri, Nov 29, 2013 at 02:23:11PM -0800, Kristian Høgsberg wrote: >> On Wed, Nov 27, 2013 at 03:50:16PM -0200, Rafael Antognolli wrote: >> > As discussed previously, this patch series adds the xdg-shell protocol, its >> > implementation

[PATCH 7/8] xdg-shell: xdg_surface_set_output should only affect fullscreen.

2013-12-03 Thread Rafael Antognolli
--- src/shell.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shell.c b/src/shell.c index dedff68..5c0660e 100644 --- a/src/shell.c +++ b/src/shell.c @@ -346,6 +346,7 @@ struct shell_surface { struct weston_output *fullscreen_output; struct westo

[PATCH 4/8] shell: Move shell_surface_set_parent to wl_shell calls.

2013-12-03 Thread Rafael Antognolli
The parent update on set_maximized and set_fullscreen is a behavior of wl_shell. That does not happen on xdg-shell, so it can't be in the set_fullscreen and set_maximized common code, but rather in the wl_shell_surface interfaces. --- src/shell.c | 24 +--- 1 file changed, 13

[PATCH 1/8] xdg_shell: Adding a new shell protocol.

2013-12-03 Thread Rafael Antognolli
xdg_shell is a protocol aimed to substitute wl_shell in the long term, but will not be part of the wayland core protocol. It starts as a non-stable API, aimed to be used as a development place at first, and once features are defined as required by several desktop shells, we can finally make it stab

[PATCH 2/8] shell: Remove SHELL_SURFACE_FULLSCREEN and SHELL_SURFACE_MAXIMIZED.

2013-12-03 Thread Rafael Antognolli
These surface types don't exist anymore inside weston desktop shell implementation. They are just exposed as wl_shell surface types, but internally the implementation is done with surface states. The previous behavior (setting a surface type unsets another one) still happens when using wl_shell. T

[PATCH 6/8] xdg-shell: Add surface size to configure.

2013-12-03 Thread Rafael Antognolli
Also emit configure on unset_maximized and unset_fullscreen. --- src/shell.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/src/shell.c b/src/shell.c index 2bff793..dedff68 100644 --- a/src/shell.c +++ b/src/shell.c @@ -310,7 +310,9 @@ struct shell_surf

[PATCH 8/8] xdg-shell: Add key bindings for setting maximized and fullscreen.

2013-12-03 Thread Rafael Antognolli
--- src/shell.c | 52 1 file changed, 52 insertions(+) diff --git a/src/shell.c b/src/shell.c index 5c0660e..c873c5a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3971,6 +3971,54 @@ move_binding(struct weston_seat *seat, uint32_t time, uint32

[PATCH 5/8] xdg-shell: Implement xdg-shell interface.

2013-12-03 Thread Rafael Antognolli
The whole xdg-shell interface is implement, except from the "focused_set" and "focused_unset" events. --- src/.gitignore | 2 + src/Makefile.am | 6 +- src/shell.c | 526 ++-- 3 files changed, 518 insertions(+), 16 deletions(-) diff --g

[PATCH 3/8] shell: Remove SHELL_SURFACE_TRANSIENT.

2013-12-03 Thread Rafael Antognolli
--- src/shell.c | 75 - 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/src/shell.c b/src/shell.c index 9071727..d346b4c 100644 --- a/src/shell.c +++ b/src/shell.c @@ -239,7 +239,6 @@ struct desktop_shell { enum shell_sur

Re: [PATCH weston 0/6] Input cleanup

2013-12-03 Thread Kristian Høgsberg
On Tue, Dec 03, 2013 at 09:12:01AM +0100, Jonas Ådahl wrote: > On Mon, Dec 02, 2013 at 03:35:33PM -0800, Kristian Høgsberg wrote: > > On Mon, Dec 02, 2013 at 10:05:01PM +0100, Jonas Ådahl wrote: > > > Hi, > > > > > > Here comes a patch series containing some input cleanup and fixes. > > > > > > T

[PATCH] Flush the wl_display at the end of SwapBuffers

2013-12-03 Thread Axel Davy
We would like the compositor to receive the commited buffer as soon as possible, so it has the time to treat it, and release old ones. We shouldn't rely on the client to flush the queue for us. Signed-off-by: Axel Davy --- We flush the wl_display after we flush the drawable. src/egl/drivers/dr

[PATCH Mesa] Enable throttling in SwapBuffers

2013-12-03 Thread Axel Davy
flush_with_flags, when available, allows the driver to throttle. Using this suppress input lag issues that can be observed in heavy rendering situations on non-intel cards. Signed-off-by: Axel Davy --- We must fight input lag, since we can have situations where the sent buffer hasn't been touched

Re: [PATCH 2/3] shell: restore app on default and unplugged output

2013-12-03 Thread Ander Conselvan de Oliveira
On 12/03/2013 05:25 AM, Xiong Zhang wrote: if the unplugged output is the first default output, the second output will move to the first working as default output. Mark the surface on unplaugged output as dirty, so on the next output repaint, these views will reassign output and get the right out

Re: [PATCH 1/3] shell: restore app on non default and unplugged output

2013-12-03 Thread Ander Conselvan de Oliveira
Hi Xiong, It seems that we need different logic for moving the views depending on the surface role, so I'm thinking this code should actually be part of a surface role implementation. For instance, instead of implementing the logic of moving the pointer surface in the shell, that would go in

[PATCH weston] compositor: add a masking mechanism to weston_view

2013-12-03 Thread Giulio Camuffo
This adds a 'mask' pixman_region32 to weston_view and to weston_view::geometry. A user, a shell probably, can set a view's mask to some region (e.g. the workspace area) and the view, and all its transform children, will be clipped to that region. weston_view::geometry.mask is the intersection of th

Re: [RFC weston] Add a release_type argument to weston_buffer_reference

2013-12-03 Thread Tomeu Vizoso
Kristian, what do you think of this one? The current state of affairs is that clients have to choose between holding more than 2 buffers, or constantly syncing with the compositor until a release comes. Thanks, Tomeu On 31 October 2013 02:59, Jason Ekstrand wrote: > This allows the caller to

Re: [PATCH/RFC] Scanner for tests

2013-12-03 Thread Marek Ch
On 3 December 2013 11:57, Pekka Paalanen wrote: > On Tue, 3 Dec 2013 11:40:19 +0100 > Marek Ch wrote: > > > Also, the UNIT_TEST define (or it's renamed alternative) have to be > > defined in both > > src/Makefile.am and tests/Makefile.am. Wouldn't it be better to > > handle this define > > via c

Re: [PATCH/RFC] Scanner for tests

2013-12-03 Thread Pekka Paalanen
On Tue, 3 Dec 2013 11:40:19 +0100 Marek Ch wrote: > Also, the UNIT_TEST define (or it's renamed alternative) have to be > defined in both > src/Makefile.am and tests/Makefile.am. Wouldn't it be better to > handle this define > via configure.ac in this case? No, because UNIT_TEST must not be defi

Re: [PATCH/RFC] Scanner for tests

2013-12-03 Thread Marek Ch
I would propose WL_PRIVATE, because it's logical to me to store the declarations into wayland-private.h (it has been already used - or even created - for this purpose). Moreover it states that the function is private (static) in the terms of Wayland. Also, the UNIT_TEST define (or it's renamed alt

[PATCH weston 1/2] input: Move the xkb fields from weston_seat to weston_keyboard

2013-12-03 Thread Jonas Ådahl
XKB integration is a keyboard feature and should as such be kept track of in the keyboard struct. Signed-off-by: Jonas Ådahl --- src/compositor-wayland.c | 2 +- src/compositor-x11.c | 8 +-- src/compositor.h | 14 ++--- src/input.c | 137 +--

[PATCH weston 2/2] input: Reset keyboard state when releasing last seat keyboard

2013-12-03 Thread Jonas Ådahl
Don't rely on the input driver to properly send button-up events for every pressed key. Signed-off-by: Jonas Ådahl --- src/input.c | 24 1 file changed, 24 insertions(+) diff --git a/src/input.c b/src/input.c index a186a4b..76b2698 100644 --- a/src/input.c +++ b/src/inp

Re: [RESEND PATCH weston v3] pixman: Destroy pixman images when underlying buffer is destroyed

2013-12-03 Thread Pekka Paalanen
On Tue, 03 Dec 2013 08:59:16 +0100 Lubomir Rintel wrote: > On Mon, 2013-12-02 at 15:53 -0800, Kristian Høgsberg wrote: > > On Sat, Nov 30, 2013 at 03:41:00PM +0100, Lubomir Rintel wrote: > > > While the pixman image might be attached, the underlying buffer > > > might be already gone under certai

Re: [PATCH weston 0/6] Input cleanup

2013-12-03 Thread Jonas Ådahl
On Mon, Dec 02, 2013 at 03:35:33PM -0800, Kristian Høgsberg wrote: > On Mon, Dec 02, 2013 at 10:05:01PM +0100, Jonas Ådahl wrote: > > Hi, > > > > Here comes a patch series containing some input cleanup and fixes. > > > > The most drastic change is removal of udev handling code from > > compositor

Re: [RESEND PATCH weston v3] pixman: Destroy pixman images when underlying buffer is destroyed

2013-12-03 Thread Kristian Høgsberg
> On Dec 2, 2013, at 11:59 PM, Lubomir Rintel wrote: > >> On Mon, 2013-12-02 at 15:53 -0800, Kristian Høgsberg wrote: >>> On Sat, Nov 30, 2013 at 03:41:00PM +0100, Lubomir Rintel wrote: >>> While the pixman image might be attached, the underlying buffer might be >>> already gone under certain c

Re: [RESEND PATCH weston v3] pixman: Destroy pixman images when underlying buffer is destroyed

2013-12-03 Thread Lubomir Rintel
On Mon, 2013-12-02 at 15:53 -0800, Kristian Høgsberg wrote: > On Sat, Nov 30, 2013 at 03:41:00PM +0100, Lubomir Rintel wrote: > > While the pixman image might be attached, the underlying buffer might be > > already gone under certain circumstances. This is easily reproduced by > > attempting to res