Re: [PATCH weston v3 01/36] weston: arm SEGV handler earlier

2017-10-31 Thread Quentin Glidic
On 10/31/17 12:48 PM, Pekka Paalanen wrote: From: Pekka Paalanen It is useful to print the backtrace regardless of whether we have a compositor and a backend initialized yet. Move catch_signals() to the earliest point in main() and protect the SEGV handler from

Re: [PATCH weston v3 08/36] libweston: strdup head make, model, serial_number

2017-10-31 Thread Pekka Paalanen
On Tue, 31 Oct 2017 13:33:17 +0100 Quentin Glidic wrote: > On 10/31/17 12:48 PM, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > > Duplicate these strings to decouple their lifetime from whatever the > > backends used. This

Re: [PATCH weston v3 06/36] libweston: refactor weston_mode_switch_finish

2017-10-31 Thread Quentin Glidic
On 10/31/17 12:48 PM, Pekka Paalanen wrote: From: Pekka Paalanen Split out a new function. This is a pure refactoring, no change in behaviour. This helps a following patch that adds a loop over output->head_list. Signed-off-by: Pekka Paalanen

Re: [PATCH weston v3 01/36] weston: arm SEGV handler earlier

2017-10-31 Thread Daniel Stone
On 31 October 2017 at 12:31, Quentin Glidic wrote: > On 10/31/17 12:48 PM, Pekka Paalanen wrote: >> It is useful to print the backtrace regardless of whether we have a >> compositor and a backend initialized yet. Move catch_signals() to the >> earliest point in

Re: Automatically choosing a VT for DRM compositor?

2017-10-31 Thread Matt Hoosier
On Mon, Oct 30, 2017 at 9:45 AM, Pekka Paalanen wrote: > On Mon, 30 Oct 2017 13:45:24 + > "Ucan, Emre (ADITG/ESB)" wrote: > > > Hello Matt and Pekka, > > > > Actually, we are OK with running weston with a static tty within a > > systemd service

Re: [PATCH weston v3 08/36] libweston: strdup head make, model, serial_number

2017-10-31 Thread Quentin Glidic
On 10/31/17 12:48 PM, Pekka Paalanen wrote: From: Pekka Paalanen Duplicate these strings to decouple their lifetime from whatever the backends used. This should prevent hard to catch use after frees and such problems in the future. Signed-off-by: Pekka Paalanen

Re: [PATCH weston] launcher: don't exit when user is not root

2017-10-31 Thread Emil Velikov
On 31 October 2017 at 16:42, Michal Suchanek wrote: >>> Ever heard of rootless X? >> >> Yes. I believe it uses logind now. > > The documentation says otherwise. > See xserver commit e7b84ca46944895971a8f048c7e34869b7de01c0 and the other work by Hans in the area. I'm

Re: [PATCH weston] launcher: don't exit when user is not root

2017-10-31 Thread Michal Suchanek
On 31 October 2017 at 08:49, Pekka Paalanen wrote: > On Mon, 30 Oct 2017 18:56:02 +0100 > Michal Suchanek wrote: > >> On 30 October 2017 at 16:02, Pekka Paalanen wrote: >> > On Mon, 30 Oct 2017 15:20:42 +0100 >> > Emre Ucan

[PATCH libinput] touchpad: allow for multiple paired keyboards

2017-10-31 Thread Peter Hutterer
needed for the razer blade keybard which provides multiple event nodes for one physical device but it's hard/impossible to identify which one is the real event node we care about. https://bugs.freedesktop.org/show_bug.cgi?id=103156 Signed-off-by: Peter Hutterer ---

Re: [PATCH weston] launcher: don't exit when user is not root

2017-10-31 Thread Pekka Paalanen
On Tue, 31 Oct 2017 09:29:11 +0200 Pekka Paalanen wrote: > On Mon, 30 Oct 2017 15:29:58 + > "Ucan, Emre (ADITG/ESB)" wrote: > > > IMO, it is much explanatory to get an error like "Cannot open drm > > device" than "weston cannot run as non-root

[PATCH] Fix debouncing algorithm

2017-10-31 Thread Vicente Bergas
The algorithm assumed that bouncing can only occur once when pressing a button. This approach did not work with my mouse because that is not 100% correct. Bouncing can occur at both the press and release events and can bounce multiple times. Also, the timeout period was missing more than 50% of

Re: [PATCH weston] gl-renderer: Set pitch correctly for subsampled textures

2017-10-31 Thread Nicolas Dufresne
Hi Daniel, Le vendredi 06 octobre 2017 à 19:03 +0100, Daniel Stone a écrit : > Hi Pekka, > > On 6 October 2017 at 08:41, Pekka Paalanen > wrote: > > I feel the commit message needs more rationale on why this is the > > correct fix before I can give a R-b. > > Fair enough.

Re: [PATCH weston] launcher: don't exit when user is not root

2017-10-31 Thread Pekka Paalanen
On Mon, 30 Oct 2017 15:29:58 + "Ucan, Emre (ADITG/ESB)" wrote: > Hi Pekka, > > We are of course running graphical applications as a different user > than weston user. Therefore, the security flaws, which you mentioned, > are not applicable. Yes. That is exactly what I

Re: [PATCH weston] launcher: don't exit when user is not root

2017-10-31 Thread Pekka Paalanen
On Mon, 30 Oct 2017 18:56:02 +0100 Michal Suchanek wrote: > On 30 October 2017 at 16:02, Pekka Paalanen wrote: > > On Mon, 30 Oct 2017 15:20:42 +0100 > > Emre Ucan wrote: > > > >> weston does not need to be root. > >> It requires

Re: [PATCH] Add the KDE server decoration protocol

2017-10-31 Thread Martin Flöser
Am 2017-10-27 16:38, schrieb Drew DeVault: Hi David, I wrote the patch for Sway and GTK+ to support this protocol. On 2017-10-27 3:35 PM, Pekka Paalanen wrote: Could you add a README to go with this, listing the protocol maintainers? See the other protocols for examples. Would it be possible

Re: Wayland developer forum

2017-10-31 Thread Pekka Paalanen
On Tue, 24 Oct 2017 19:50:41 +0300 Jari Vuomajoki wrote: > Hello! > > Is this a forum for asking Wayland related questions? I have been working > on building a client, so far it has been ok, now I am wondering how to move > forward. Hello Jari, yes, this is the place.

Wayland developer forum

2017-10-31 Thread Jari Vuomajoki
Hello! Is this a forum for asking Wayland related questions? I have been working on building a client, so far it has been ok, now I am wondering how to move forward. best, Jari Vuomajoki ___ wayland-devel mailing list

[PATCH weston 1/2] compositor-drm, compositor-fbdev: stop suggesting root

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Stop suggesting to run Weston as root, it is only meant for debugging. Instead, mention the two supported ways to run Weston on DRM and fbdev: weston-launch helper and logind service. Cc: "Ucan, Emre (ADITG/ESB)"

[PATCH weston 2/2] man: mention logind for launching

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Logind has been long supported as means to launch Weston without weston-launch. It's good to note it in the manual. Signed-off-by: Pekka Paalanen --- man/weston.man | 9 ++--- 1 file changed, 6

[PATCH weston v3 00/36] Head-based output configuration API a.k.a clone mode infrastructure

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Hi all, this series introduces a head-based output configuration API, which is a prerequisite for implementing shared-CRTC clone mode. Clone mode implementation is not part of this series. The previous posting of this series was the RFC at

[PATCH weston v3 05/36] libweston: make wl_output point to weston_head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen The user data of a wl_resource representing a wl_output protocol object used to be a pointer to weston_output. Now that weston_output is being split, wl_output more accurately refers to weston_head which is a single monitor. Change the

[PATCH weston v3 11/36] libweston: add weston_head::connected

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Heads may be disconnected or connected and the compositor needs to be able to know the state to know which heads to take into use. Currently a single head is automatically created with an output, and outputs are only ever created as connected

[PATCH weston v3 16/36] libweston: add weston_head_is_device_changed() API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Reacting to DRM hotplug events is racy. It is theoretically possible to get hotplug events for a quick swap from one monitor to another and process both only after the new monitor is connected. Hence it is possible for display device

[PATCH weston v3 02/36] libweston: introduce weston_head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen In order to support clone modes, libweston needs the concept of a head that is separate from weston_output. While weston_output manages buffers and the repaint state machine, weston_head will represent a single monitor. In the future it will

[PATCH weston v3 04/36] libweston: use head in wl_output global

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen As a wl_output represents weston_head, use a weston_head pointer as the wl_output global's user data. Signed-off-by: Pekka Paalanen --- libweston/compositor.c | 10 ++ libweston/compositor.h | 2 ++

[PATCH weston v3 06/36] libweston: refactor weston_mode_switch_finish

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Split out a new function. This is a pure refactoring, no change in behaviour. This helps a following patch that adds a loop over output->head_list. Signed-off-by: Pekka Paalanen --- libweston/compositor.c |

[PATCH weston v3 13/36] libweston: add heads_changed hook

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Add a hook for compositors to get a callback when heads are added or their connection status changes, to which compositors likely want to react to by enabling or disabling outputs (API for that to be added later). As many head changes as

[PATCH weston v3 09/36] cms-colord: find a good head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen The 'head' member of 'struct weston_output' is going to go unused and then disappear, so stop using it and find a head from the proper list. However, this leaves a problem in cms-colord: if you have multiple monitors driver with the same

[PATCH weston v3 08/36] libweston: strdup head make, model, serial_number

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Duplicate these strings to decouple their lifetime from whatever the backends used. This should prevent hard to catch use after frees and such problems in the future. Signed-off-by: Pekka Paalanen ---

[PATCH weston v3 07/36] libweston: introduce weston_output::head_list

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen The intention is that in the future backends will dynamically allocate weston_heads based on the resources they have. The lifetime of a weston_head will be independent of the lifetime of a weston_output it may be attached to. Backends allocate

[PATCH weston v3 03/36] libweston: move wl_output to weston_head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen The wl_output protocol interface exposes things like monitor make, model, sub-pixel layout and physical dimensions. Obviously wl_output is meant to represent a monitor. The abstraction of a monitor is weston_head. Therefore move the wl_output

[PATCH weston v3 10/36] libweston: add name to weston_head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Heads need to be named, so they can be referenced in logs and configuration sources. When clone mode is implemented, output and head names may differ. Signed-off-by: Pekka Paalanen --- libweston/compositor.c

[PATCH weston v3 21/36] weston: migrate fbdev to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Migrate the fbdev frontend to use the new head-based output configuration API: listen for heads_changed, and process all heads. Signed-off-by: Pekka Paalanen --- compositor/main.c | 11 +-- 1 file

[PATCH weston v3 22/36] weston: migrate RDP to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Migrate the RDP frontend to use the new head-based output configuration API: listen for heads_changed, and process all heads. Signed-off-by: Pekka Paalanen --- compositor/main.c | 15 +++ 1 file

[PATCH weston v3 12/36] libweston: add compositor list of heads

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen weston_compositor needs to maintain a list of all available heads, so that a compositor can pick and choose which heads to take into or out of use at arbitrary times. The heads may be on or off, and connected or disconnected. Signed-off-by:

[PATCH weston v3 18/36] weston: migrate headless to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Migrate the headless frontend to use the new head-based output configuration API: listen for heads_changed, and process all heads. The simple_heads_changed() function is written to be able to cater for all backends. The rest will be migrated

[PATCH weston v3 20/36] weston: migrate wayland to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Migrate the Wayland frontend to use the new head-based output configuration API: listen for heads_changed, and process all heads. Signed-off-by: Pekka Paalanen --- compositor/main.c | 27

[PATCH weston v3 19/36] weston: migrate x11 to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Migrate the x11 frontend to use the new head-based output configuration API: listen for heads_changed, and process all heads. Signed-off-by: Pekka Paalanen --- compositor/main.c | 14 +- 1 file

[PATCH weston v3 17/36] weston: move weston_output_enable() into callers

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Move the call out of wet_configure_windowed_output_from_config() and into its callers. This allows to migrate each frontend one by one. Signed-off-by: Pekka Paalanen --- compositor/main.c | 8 ++-- 1

[PATCH weston v3 24/36] libweston: change windowed_output_api output_create to create_head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Rename the function pointer to create_head() because that is what it does on backends that are converted to the head-based API. Update the documentation to match. Surprisingly this is not an ABI break, as the function behaviour and signature

[PATCH weston v3 15/36] libweston: add weston_head destroy signal

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Add support for subscribing to weston_head destruction. The primary use case for heads being destroyed arbitrarily is the DRM-backend with MST connectors, which may disappear on unplug. It is not just the connector becoming disconnected, it

[PATCH weston v3 14/36] libweston: new head-based output management API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Introduce the API for users (compositors) to create an output from a head, attach and detach heads, and destroy outputs created this way. This also adds the backend-facing API to libweston. In the new API design, a backend creates heads, and

[PATCH weston v3 33/36] compositor-fbdev: migrate to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Implement the head-based output API in this backend, and stop relying on the implicit weston_output::head. The split between fbdev_head and fbdev_output is somewhat arbitrary. There is no hotplug or unplug, and there is always 1:1

[PATCH weston v3 34/36] compositor-x11: migrate to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Follow the standard pattern set by the headless backend which also uses the the window output API. Stops relying on the implicit weston_output::head. Signed-off-by: Pekka Paalanen ---

[PATCH weston v3 23/36] weston: migrate DRM to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Migrate the DRM frontend to use the simple head-based output configurator, maintaining the exact same features and semantics as before. This is an intermediate step. It is unoptimal to create a weston_output just to turn it off, but the

[PATCH weston v3 28/36] libweston: assert current_mode in weston_output_enable()

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen The functions called here, particularly weston_output_transform_scale_init(), rely on current mode being set. The current mode must also be found in the mode list, though we don't explicitly check it here. current_mode not being set is a

[PATCH weston v3 30/36] compositor-headless: migrate to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Implement the head-based output API in this backend, and stop relying on the implicit weston_output::head. Signed-off-by: Pekka Paalanen --- libweston/compositor-headless.c | 75

[PATCH weston v3 29/36] libweston: cancel idle_repaint on output destroy

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen If the idle_repaint() callback has been scheduled when a weston_output gets destroyed, the callback will hit use-after-free. I have encountered this when migrating the wayland backend to the head-based API, using --sprawl, and

[PATCH weston v3 25/36] libweston: remove output_pending_signal

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen The signal has been replaced with the heads_changed hook and is no longer useful. weston_pending_output_coldplug() is renamed to weston_compositor_flush_heads_changed() for two reasons: it better describes what it does now, and it serves as

[PATCH weston v3 32/36] compositor-fbdev: make re-enable less drastic

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Destroying the whole output in reenable would cause list walk corruption: the loop over output_list in session_notify() is not using wl_list_for_each_safe so output removal would break it. Creating a new output is also problematic as it needs

[PATCH weston v3 26/36] libweston: stop auto-adding the implicit head

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen All frontends have been converted to the new head-based output management API, which means that weston_compositor_create_output_with_head() is calling weston_output_attach_head(). We will never hit the implicit attach anymore. Therefore we

[PATCH weston v3 36/36] compositor-wayland: migrate to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Follow the standard pattern used in the headless and x11 backend migration, but also cater for the two other backend modes: --sprawl or fullscreen-shell, and --fullscreen. Stops relying on the implicit weston_output::head. Unlike other

[PATCH weston v3 35/36] compositor-wayland: strict surface create/destroy

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Add safeguards to make it painfully obvious if we ever get the pairing of wayland_backend_create_output_surface() and wayland_backend_destroy_output_surface() wrong. Helps catching bugs. Signed-off-by: Pekka Paalanen

[PATCH weston v3 27/36] libweston: assert make/model in weston_output_enable()

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Output make and model are not allowed to be NULL in the protocol, so ensure they are not forgotten when enabling an output. Signed-off-by: Pekka Paalanen --- libweston/compositor.c | 6 ++ 1 file changed,

[PATCH weston v3 31/36] compositor-rdp: migrate to head-based output API

2017-10-31 Thread Pekka Paalanen
From: Pekka Paalanen Follow the starndard patttern as the other backends, headless and x11 in particular, to stop relying on the implicit weston_output::head. Signed-off-by: Pekka Paalanen --- libweston/compositor-rdp.c | 64

[PATCH v2 libinput] pad: use libwacom to get the evdev to button number mapping

2017-10-31 Thread Peter Hutterer
Some of wacom's tablets, notably the Bamboo series, have a non-predictable scheme of mapping the buttons to numeric button numbers in libwacom. Since we promise sequential button numbers, we need to have those identical to libwacom, otherwise it's impossible to map the two together. Most tablets

Re: [PATCH libinput] Fix debouncing algorithm

2017-10-31 Thread Peter Hutterer
Hi Vicente sorry about the delay, too many things on right now. On Wed, Oct 25, 2017 at 09:12:53PM +0200, Vicente Bergas wrote: > The algorithm assumed that bouncing can only occur once when pressing a > button. > This approach did not work with my mouse because that is not 100% > correct.

Re: [PATCH weston] launcher: don't exit when user is not root

2017-10-31 Thread Christian Stroetmann
On the 30th of October 2017 16:02, Pekka Paalanen wrote: On Mon, 30 Oct 2017 15:20:42 +0100 Emre Ucan wrote: weston does not need to be root. It requires adjusting ownership on the given tty device. If weston does not have proper rights, it will get an error at startup