[PATCH wayland-protocols v4 6/7] xdg-shell: Make xdg_popup non-grabbing by default

2016-06-23 Thread Jonas Ådahl
Turn xdg_popup into plain temporary child surfaces without any grabbing or mapping order requirements by default. In order to create grabbing popup chains, a new request 'grab' is introduced which enables more or less the same semantics and requirements as xdg_popup previously had related to grabb

[PATCH wayland-protocols v4 2/7] xdg-shell: Put xdg_shell events after requests

2016-06-23 Thread Jonas Ådahl
It makes the structure consistent with most other protocols and provides a clear separation between what is done by the server and what is done by the client. Signed-off-by: Jonas Ådahl Reviewed-by: Yong Bakos Reviewed-by: Mike Blumenkrantz --- Changes since v3: - Added 'See xdg_shell.ping/p

[PATCH wayland-protocols v4 7/7] xdg-shell: Introduce xdg_positioner

2016-06-23 Thread Jonas Ådahl
xdg_positioner is a method for declarative positioning of child surfaces (currently only xdg_popup surfaces). A client creates a description of a positioning logic using the xdg_positioner interface. The xdg_positioner object is then used when creating a xdg_popup for describing how the child surfa

[PATCH wayland-protocols v4 1/7] xdg-shell: Turn xdg_surface into a generic base interface

2016-06-23 Thread Jonas Ådahl
Split out toplevel window like requests and events into a new interface called xdg_toplevel, and turn xdg_surface into a generic base interface which others extends. xdg_popup is changed to extend the xdg_surface. The configure event in xdg_surface was split up making xdg_surface.configure an eve

[PATCH wayland-protocols v4 4/7] xdg-shell: Improve error enum formatting some

2016-06-23 Thread Jonas Ådahl
The long lines stood out, break them by putting the summary on its own line. Signed-off-by: Jonas Ådahl Reviewed-by: Yong Bakos Reviewed-by: Mike Blumenkrantz Reviewed-by: Benoit Gschwind --- No changes since v3. unstable/xdg-shell/xdg-shell-unstable-v6.xml | 12 1 file changed

[PATCH wayland-protocols v4 3/7] xdg-shell: Add error codes for invalid surface state

2016-06-23 Thread Jonas Ådahl
Signed-off-by: Jonas Ådahl Reviewed-by: Mike Blumenkrantz Reviewed-by: Yong Bakos --- No changes since v3. unstable/xdg-shell/xdg-shell-unstable-v6.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unstable/xdg-shell/xdg-shell-unstable-v6.xml b/unstable/xdg-shell/xdg-shell-unstable-v

[PATCH wayland-protocols v4 5/7] xdg-shell: Make get_popup take a xdg_surface instead of wl_surface

2016-06-23 Thread Jonas Ådahl
The reason for using wl_surface before was that xdg_popup and xdg_surface (now xdg_toplevel) had no common interface other than wl_surface, but since xdg_surface is now the base interface, lets use that. Signed-off-by: Jonas Ådahl Reviewed-by: Mike Blumenkrantz Reviewed-by: Yong Bakos Reviewed-

[ANNOUNCE] libinput 1.3.3

2016-06-23 Thread Peter Hutterer
This is a rather large updates (in commit numbers) but an important one. In libinput 1.2 we dropped using a hysteresis for touchpad devices because modern touchpads are more precise than older touchpads. Since we found that even those newer touchpads are prone to wobbling cursor when a finger is he

[PATCH v3 libinput 10/10] test: add pad mode group tests

2016-06-23 Thread Peter Hutterer
Signed-off-by: Peter Hutterer Reviewed-by: Jason Gerecke --- Changes to v2: See v3 06/10 for details. This is effectively the unifdef HAVE_LIBWACOM version of the v2. test/Makefile.am| 1 + test/litest-device-wacom-cintiq-24hdt-pad.c | 148 ++ tes

[PATCH v3 libinput 06/10] pad: implement basic mode group support (1 group with 1 mode)

2016-06-23 Thread Peter Hutterer
Until the kernel patches to handle LED group switching are in place we provide the external API backed by an implementation that simply exposes one group with one mode and no toggle buttons. This allows us to ship a libinput release with the API in place and switch libinput later without having all

Re:Re: How to create client in child thread

2016-06-23 Thread 袁嘉伟
在 2016-06-23 21:13:28,"Pekka Paalanen" 写道: >On Thu, 23 Jun 2016 14:52:23 +0800 (CST) >袁嘉伟 wrote: > >> Hi Pekka: >> >> Sorry to take you some time. It's still this issue. >> I made a test that using 'pthread' to created another thread, and then >> created the display in the child thread. >> But

Re: [PATCH weston v3 2/8] compositor: Track inhibition state in weston_surface

2016-06-23 Thread Bryce Harrington
On Thu, May 26, 2016 at 06:01:27PM +0300, Pekka Paalanen wrote: > On Thu, 7 Apr 2016 16:44:17 -0700 > Bryce Harrington wrote: > > > Signed-off-by: Bryce Harrington > > Hi, > > the commit message could use an explanation of what the 'bool active' > will actually be useful for. What do we need

Re: [PATCH v3] compositor-x11: fix title overflow in x11_backend_create_output

2016-06-23 Thread Daniel Stone
Hi, On 7 June 2016 at 03:29, Bryce Harrington wrote: > On Sun, Jun 05, 2016 at 07:01:11PM +0200, Benoit Gschwind wrote: >> sprintf can overflow the fixed length title which is char[32]. This >> patch change title to dynamically allocated char array using asprintf or >> strdup. If one of them fail

[PATCH weston] editor: Fix g_type_init() call

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic HAVE_PANGO is not in any AC_DEFINE(), so the check is just wrong. g_type_init() was never called, which is fine since GLib 2.36 anyway. It is better not to have a wrong usage of HAVE_PANGO here. Signed-off-by: Quentin Glidic --- We can also just drop g_type_init() altogeth

[PATCH weston 1/7] desktop-shell/client: Add bottom panel support

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic Signed-off-by: Quentin Glidic --- clients/desktop-shell.c | 54 +++-- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index f5e0ba2..2c215e1 100644 --- a/clients/de

[PATCH weston 3/7] desktop-shell: Properly position the panel surface

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic Now weston actually supports putting the panel at the bottom of the screen. Signed-off-by: Quentin Glidic --- desktop-shell/shell.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c i

[PATCH weston 7/7] desktop-shell/client: Add left/right panel position (basic) support

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic Signed-off-by: Quentin Glidic --- clients/desktop-shell.c | 42 ++ 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 0f2af73..1886ebc 100644 --- a/clients/desktop-sh

[PATCH weston 2/7] desktop-shell: Compute panel size without using output

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic Signed-off-by: Quentin Glidic --- desktop-shell/shell.c | 48 +++- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 2c88176..a5fca56 100644 --- a/desktop-shell/she

[PATCH weston 6/7] desktop-shell/client: Introduce helper variables

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic These variables will be much more useful in the following commit. The indentation is off to avoid future diff noise. Signed-off-by: Quentin Glidic --- clients/desktop-shell.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/client

[PATCH weston 5/7] desktop-shell/client: Parse the clock format once

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic Signed-off-by: Quentin Glidic --- clients/desktop-shell.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 89c3277..6686e53 100644 --- a/clients/desktop-shell.c +++

[PATCH weston 4/7] desktop-shell/client: Use a proper enum for clock format

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic Signed-off-by: Quentin Glidic --- clients/desktop-shell.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 2c215e1..89c3277 100644 --- a/clients/desktop-shell.c +++ b/clients/deskt

[PATCH weston 0/7] desktop-shell: Panel improvements

2016-06-23 Thread Quentin Glidic
From: Quentin Glidic While debugging my notification-area plugin, I had to test proper placement based on panel position and size. So here is a proper implementation of panel position in Weston. Patches 1-3 fix the bottom position. Mostly fixing the position server-side. Patches 4-5 are a smal

Re: [PATCH weston] tests: print the command line to log

2016-06-23 Thread Pekka Paalanen
On Wed, 22 Jun 2016 15:00:49 +0200 Quentin Glidic wrote: > On 13/06/2016 13:18, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > > weston-tests-env is a beast to handle, when you would like to start > > weston manually for a test you wan to start inside gdb. This patch > > causes the full co

Re: [PATCH weston] main: log the command line

2016-06-23 Thread Pekka Paalanen
On Wed, 22 Jun 2016 15:05:04 +0200 Quentin Glidic wrote: > On 13/06/2016 13:28, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > > Write the command line to the log to aid debugging. It needs to be > > copied before parsing, because parsing mutates argv. > > > > Signed-off-by: Pekka Paalanen

Re: [PATCH weston v2] tests: fix the cursor race in internal-screenshot

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 09:45:56 -0500 Derek Foreman wrote: > On 23/06/16 07:17 AM, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > > This fix also depends on "compositor-headless: do not create a seat". > > > > If we lose the race against weston-desktop-shell setting cursors, which > > is ve

Re: [PATCH weston v2 0/2] Separate Weston from libweston

2016-06-23 Thread Pekka Paalanen
On Wed, 22 Jun 2016 23:08:50 +0200 Benoit Gschwind wrote: > Hello Pekka, > > I did not made an extensive check, but at less I tested it > (drm-/x11-backend), and the idea of the patch is ok for me. > > Nothing is in stone, go for this way and fix issue when they arise. > > maybe I would choose

Re: [PATCH weston v2] tests: fix the cursor race in internal-screenshot

2016-06-23 Thread Derek Foreman
On 23/06/16 07:17 AM, Pekka Paalanen wrote: > From: Pekka Paalanen > > This fix also depends on "compositor-headless: do not create a seat". > > If we lose the race against weston-desktop-shell setting cursors, which > is very rare, we get a cursor image in the screenshot, causing the test > to

Re: [PATCH weston v2 0/2] Separate Weston from libweston

2016-06-23 Thread Pekka Paalanen
On Wed, 22 Jun 2016 21:33:30 -0700 Bryce Harrington wrote: > On Wed, Jun 22, 2016 at 02:44:23PM +0300, Pekka Paalanen wrote: > > On Thu, 9 Jun 2016 15:20:35 +0300 > > Pekka Paalanen wrote: > > > > > From: Pekka Paalanen > > > > > > After these two patches, we have weston-the-compositor sou

Re: How to create client in child thread

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 14:52:23 +0800 (CST) 袁嘉伟 wrote: > Hi Pekka: > > Sorry to take you some time. It's still this issue. > I made a test that using 'pthread' to created another thread, and then > created the display in the child thread. > But program was blocked when connecting to a server(wl_di

Re: [PATCH weston 00/11] tests: wrap all pixel data with Pixman

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 18:18:18 +1000 Daniel Stone wrote: > Hi, > > On 17 June 2016 at 00:13, Pekka Paalanen wrote: > > I believe Pixman is the most future-proof approach, so I went with that, and > > started doing everything in pixman_image_t's. > > > > The patch series works in simple steps: fir

Re: [PATCH weston 06/11] tests: let create_shm_buffer() handle any format

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 18:12:27 +1000 Daniel Stone wrote: > Hi, > > On 17 June 2016 at 00:13, Pekka Paalanen wrote: > > Change create_shm_buffer() to handle any pixel format known to Pixman. > > Presumably in the future we might want to test e.g. RGB565 content with > > screenshot tests. > > Si

Re: [PATCH weston 08/11] compositor: Untangle mapedness from outputs

2016-06-23 Thread Giulio Camuffo
2016-06-18 19:15 GMT+02:00 Armin Krezović : > Currently, weston assumes a surface/view is mapped if > it has an output assigned. In a zero outputs scenario, > this isn't really desirable. > > This patch introduces a new flag to weston_surface and > weston_view, which has to be set manually to indic

Re: [PATCH weston 0/3] Work around cursors messing up screenshot test

2016-06-23 Thread Pekka Paalanen
On Thu, 16 Jun 2016 10:49:36 -0500 Derek Foreman wrote: > On 16/06/16 05:36 AM, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > > The internal-screenshot test has been failing randomly and rarely. That is > > caused by cursors being drawn unexpectedly. This series implements the > > minim

[PATCH weston v2] tests: fix the cursor race in internal-screenshot

2016-06-23 Thread Pekka Paalanen
From: Pekka Paalanen This fix also depends on "compositor-headless: do not create a seat". If we lose the race against weston-desktop-shell setting cursors, which is very rare, we get a cursor image in the screenshot, causing the test to fail. This is now fixed by moving the (remaining) cursor o

Re: [PATCH weston 01/11] tests: introduce struct buffer for client-helper

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 18:07:49 +1000 Daniel Stone wrote: > Hi, > > On 17 June 2016 at 00:13, Pekka Paalanen wrote: > > Create a new struct buffer to encapsulate the image representation, the > > wl_buffer, and enough information to tear it all down (munmap) so we > > don't have to leak everything

Re: [PATCH weston 3/3] tests: fix the cursor race in internal-screenshot

2016-06-23 Thread Pekka Paalanen
On Wed, 22 Jun 2016 18:09:50 -0500 Derek Foreman wrote: > On 17/06/16 03:57 AM, Pekka Paalanen wrote: > > On Thu, 16 Jun 2016 10:59:21 -0500 Derek Foreman > > wrote: > > > >> On 16/06/16 05:36 AM, Pekka Paalanen wrote: > >>> From: Pekka Paalanen > >>> > >>> This fix also depends on "compo

Re: [PATCH] wayland-server: Add APIs to get some structure's value

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 19:47:23 +0900 __ wrote: > Dear, Mr. Pekka Paalanen. > > Thanks you for your rapid reply and > I understand what you mean. > > Yes, I just want to make like weston-info. > But I want to insert extra information than weston-info. > > Weston-info just print interface's na

Re: [PATCH] scanner: Fix building on musl

2016-06-23 Thread Pekka Paalanen
On Thu, 23 Jun 2016 07:52:16 +0200 Hardening wrote: > Le 23/06/2016 01:48, Kylie McClain a écrit : > > From: Kylie McClain > > > > `uint` is defined in sys/types.h on musl libc. > > > > Signed-off-by: Kylie McClain > > --- > > src/scanner.c | 1 + > > 1 file changed, 1 insertion(+) > > > >

RE: [PATCH] wayland-server: Add APIs to get some structure's value

2016-06-23 Thread 강정현
Dear, Mr. Pekka Paalanen. Thanks you for your rapid reply and I understand what you mean. Yes, I just want to make like weston-info. But I want to insert extra information than weston-info. Weston-info just print interface's name/version/id about user defined interface. So I can't print requests

[PATCH weston 03/12] toytoolkit: Return NULL when no outputs are present

2016-06-23 Thread Armin Krezović
Currently, display_get_output returns a first member of the linked list, which can never be NULL. This is problematic, as the function would return a dangling pointer and NULL pointer checks wouldn't work where needed and some of the invalid members would get accessed that way, resulting in a cras

[PATCH weston 12/12] compositor: Switch to new surface/view mapped checks

2016-06-23 Thread Armin Krezović
This patch makes use of new flags which were introduced by previous patches to check if a surface/view is mapped Signed-off-by: Armin Krezović --- src/compositor.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 93371b1..67

[PATCH weston 10/12] fullscreen-shell: update for manual surface/view mapping

2016-06-23 Thread Armin Krezović
This is a follow up for fullscreen-shell to manually set mapped status for views/surfaces it controls Signed-off-by: Armin Krezović --- fullscreen-shell/fullscreen-shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-she

[PATCH weston 05/12] fullscreen-shell: Avoid NULL pointer dereference

2016-06-23 Thread Armin Krezović
When there are no outputs present, an output pointer can be NULL. Dereferencing such pointer will result in a crash. Signed-off-by: Armin Krezović --- fullscreen-shell/fullscreen-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fullscreen-shell/fullscreen-shell.c b/fu

[PATCH weston 09/12] desktop-shell: update for manual surface/view mapping

2016-06-23 Thread Armin Krezović
This is a follow up for desktop-shell to manually set mapped status for views/surfaces it controls Signed-off-by: Armin Krezović --- desktop-shell/input-panel.c | 2 ++ desktop-shell/shell.c | 10 ++ 2 files changed, 12 insertions(+) diff --git a/desktop-shell/input-panel.c b/des

[PATCH weston v2 07/12] gl-renderer: Always setup gl-renderer

2016-06-23 Thread Armin Krezović
Currently, the gl-renderer setup is being done on per-output basis. This isn't desirable when trying to make weston run with zero outputs. When there are no outputs present, there is no surface available to attach an EGLContext to with eglMakeCurrent, which makes any EGL command fail. The problem

[PATCH weston v2 08/12] compositor: Untangle mapedness from outputs

2016-06-23 Thread Armin Krezović
Currently, weston assumes a surface/view is mapped if it has an output assigned. In a zero outputs scenario, this isn't really desirable. This patch introduces a new flag to weston_surface and weston_view, which has to be set manually to indicate that a surface/view is mapped. v2: - Remove usage

[PATCH weston 11/12] ivi-shell: update for manual surface/view mapping

2016-06-23 Thread Armin Krezović
This is a follow up for ivi-shell to manually set mapped status for views/surfaces it controls Signed-off-by: Armin Krezović --- ivi-shell/input-panel-ivi.c | 2 ++ ivi-shell/ivi-layout.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ivi-shell/input-panel-ivi.c b/ivi-shell/input-pa

[PATCH weston 02/12] desktop-shell: Return NULL when no outputs are present

2016-06-23 Thread Armin Krezović
Currently, get_default_output returns a first member of the linked list, which can never be NULL. This is problematic, as the function would return a dangling pointer and NULL pointer checks wouldn't work where needed and some of the invalid members would get accessed that way, resulting in a cras

[PATCH weston 04/12] desktop-shell: Avoid NULL pointer dereference

2016-06-23 Thread Armin Krezović
When there are no outputs present, an output pointer can be NULL. Dereferencing such pointer will result in a crash. Reviewed-by: Quentin Glidic Reviewed-by: Pekka Paalanen Signed-off-by: Armin Krezović --- desktop-shell/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH weston v2 06/12] keyboard: Only set toplevel when there is a valid output

2016-06-23 Thread Armin Krezović
Currently, the keyboard client is created and the input panel surface is set as toplevel on the first output it finds. This does not work in a scenario when there are no outputs, resulting in weston-keyboard to crash at startup due to operating on an invalid output pointer. This makes input panel

[PATCH weston v2 01/12] compositor-headless: Support starting with zero outputs

2016-06-23 Thread Armin Krezović
This patch adds a new command line option which can be used to tell headless backend not to create any virtual outputs. This will be used for output hotplug emulation, where weston will start with no outputs available, and the virtual output will be created at runtime. v2: - Use bool instead of

Re: [PATCH weston v2 3/3] compositor-x11: remove manual mouse button grab/ungrab

2016-06-23 Thread Benoit Gschwind
Hello Daniel, You are right, my explanation is too general. For the story, I looked at x11-backend because during my use of this backend I meet several unexpected behavior of my cursor, but at the time I didn't figured out the real issue. Then I see how the grab is handled in x11-backend, I was wo

Re: [PATCH weston 00/11] tests: wrap all pixel data with Pixman

2016-06-23 Thread Daniel Stone
Hi, On 17 June 2016 at 00:13, Pekka Paalanen wrote: > I believe Pixman is the most future-proof approach, so I went with that, and > started doing everything in pixman_image_t's. > > The patch series works in simple steps: first introduce a struct buffer, which > contains a pixman_image_t and a w

Re: [PATCH weston 06/11] tests: let create_shm_buffer() handle any format

2016-06-23 Thread Daniel Stone
Hi, On 17 June 2016 at 00:13, Pekka Paalanen wrote: > Change create_shm_buffer() to handle any pixel format known to Pixman. > Presumably in the future we might want to test e.g. RGB565 content with > screenshot tests. Similarly to #1, this: - uses the new struct buffer - moves from raw allo

Re: [PATCH weston 01/11] tests: introduce struct buffer for client-helper

2016-06-23 Thread Daniel Stone
Hi, On 17 June 2016 at 00:13, Pekka Paalanen wrote: > Create a new struct buffer to encapsulate the image representation, the > wl_buffer, and enough information to tear it all down (munmap) so we > don't have to leak everything. Some tests might start doing things in > loops, and leaking would a

Re: [PATCH weston v2 3/3] compositor-x11: remove manual mouse button grab/ungrab

2016-06-23 Thread Daniel Stone
Hi, On 19 May 2016 at 05:32, Benoit Gschwind wrote: > In current compositor-x11, the mouse buttons are grabbed and ungrabbed > manually that may produce weird cases like starting a grab while the > buttons are already released, due to asynchronous X11 events dispatching. > > The patch avoid the i

Re: [PATCH weston v2 2/3] compositor-x11: remove redundant state arg of x11_backend_deliver_button_event

2016-06-23 Thread Daniel Stone
On 19 May 2016 at 05:32, Benoit Gschwind wrote: > The "state" variable in x11_backend_deliver_button_event is basically the > same as (event->response_type == XCB_BUTTON_PRESS), thus update the code > to use the last one. > > Signed-off-by: Benoit Gschwind Reviewed-by: Daniel Stone

Re: [PATCH weston v2 1/3] compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_event

2016-06-23 Thread Daniel Stone
On 19 May 2016 at 05:32, Benoit Gschwind wrote: > The x11_backend_deliver_button_event can be called with any > xcb_generic_event. The assert check if the call is done with the > expected events. > > Signed-off-by: Benoit Gschwind Reviewed-by: Daniel Stone __

Re: [PATCH weston v2] compositor: allow to control the vt switching

2016-06-23 Thread Daniel Stone
Hi Guilio, On 5 June 2016 at 03:48, Giulio Camuffo wrote: > @@ -97,8 +97,17 @@ switch_vt_binding(struct weston_keyboard *keyboard, > uint32_t time, uint32_t key, void *data) > { > struct weston_compositor *compositor = data; > + struct weston_launcher *launcher =