Re: [PATCH v4 2/2] xwm: Scale icon if size is not the target size

2018-03-23 Thread Scott Moreau
On Fri, Mar 23, 2018 at 2:15 PM, Derek Foreman wrote: > On 2018-03-23 02:47 PM, Scott Moreau wrote: > > This scales the icon cairo surface for the titlebar if it isn't the > > target size. > > > > shared/cairo-util: Add surface resizing function to be used for this > > case and other potential ca

Re: [PATCH v4 2/2] xwm: Scale icon if size is not the target size

2018-03-23 Thread Derek Foreman
On 2018-03-23 02:47 PM, Scott Moreau wrote: > This scales the icon cairo surface for the titlebar if it isn't the > target size. > > shared/cairo-util: Add surface resizing function to be used for this > case and other potential cases. > --- > > Changed in v2: > > - Rebase to [PATCH 1/1 v3] xwm:

Re: [PATCH v4 1/2] xwm: Choose icon closest to target size

2018-03-23 Thread Derek Foreman
On 2018-03-23 02:47 PM, Scott Moreau wrote: > Xwayland clients can offer multiple icon sizes in no particular order. > Previously xwm was selecting the first one unconditionally. This patch > selects the icon that matches the size closest to the target size. The > target size is hard coded to 16 si

Re: [PATCH v3] xwm: Fix memory leak

2018-03-23 Thread Derek Foreman
On 2018-03-23 02:41 PM, Scott Moreau wrote: > A memory leak introduced by 6b58ea8c led to me finding a bigger leak, > which is xwm was calling frame_create() without calling frame_destroy(). > This meant that the associated icon_surface was not being destroyed, > leaving the destroy handler for it

[PATCH v4 1/2] xwm: Choose icon closest to target size

2018-03-23 Thread Scott Moreau
Xwayland clients can offer multiple icon sizes in no particular order. Previously xwm was selecting the first one unconditionally. This patch selects the icon that matches the size closest to the target size. The target size is hard coded to 16 since there is only one theme and the data used to cre

[PATCH v4 2/2] xwm: Scale icon if size is not the target size

2018-03-23 Thread Scott Moreau
This scales the icon cairo surface for the titlebar if it isn't the target size. shared/cairo-util: Add surface resizing function to be used for this case and other potential cases. --- Changed in v2: - Rebase to [PATCH 1/1 v3] xwm: Choose icon closest to target size Changed in v3: - No change

[PATCH v3] xwm: Fix memory leak

2018-03-23 Thread Scott Moreau
A memory leak introduced by 6b58ea8c led to me finding a bigger leak, which is xwm was calling frame_create() without calling frame_destroy(). This meant that the associated icon_surface was not being destroyed, leaving the destroy handler for it broken. Here we fix this by calling frame_destroy()

Re: [PATCH v2] xwm: Fix memory leak

2018-03-23 Thread Scott Moreau
Hi Derek, On Fri, Mar 23, 2018 at 12:22 PM, Derek Foreman wrote: > On 2018-03-20 10:26 AM, Scott Moreau wrote: > > A memory leak introduced by 6b58ea8c led to me finding a bigger > > leak, which is xwm was calling frame_create() without calling > > frame_destroy(). This meant that the associated

Re: [PATCH v3] xwm: Choose icon closest to target size

2018-03-23 Thread Scott Moreau
Hi Derek, On Fri, Mar 23, 2018 at 11:34 AM, Derek Foreman wrote: > Thanks for this. This particular feature is getting on my nerves > because it seemed like a simple thing and has result in a lot of breakage. > > Would like to see it repaired or removed by late next week. > Thanks for reviewin

Re: [PATCH 2/2 v2] xwm: Scale icon if size is not the target size

2018-03-23 Thread Scott Moreau
Hi Derek, On Fri, Mar 23, 2018 at 11:59 AM, Derek Foreman wrote: > On 2018-03-22 01:04 AM, Scott Moreau wrote: > > This scales the icon cairo surface for the titlebar if it isn't the > > target size. > > > > shared/cairo-util: Add surface resizing function to be used for this > > case and other

Re: [PATCH weston] libweston/compositor-drm: Reset repaint scheduled status when setting DPMS level to off

2018-03-23 Thread Greg V
On 7 March 2018 at 17:36, Marius Vlad > wrote: / /Otherwise when setting dpms level DPMS_ON, weston_output_schedule_repaint() //will bail out early and never get a chance to wake up the output. Arguably this could also be done in d

Re: [PATCH v2] xwm: Fix memory leak

2018-03-23 Thread Derek Foreman
On 2018-03-20 10:26 AM, Scott Moreau wrote: > A memory leak introduced by 6b58ea8c led to me finding a bigger > leak, which is xwm was calling frame_create() without calling > frame_destroy(). This meant that the associated icon_surface > was not being destroyed, leaving the destroy handler for it

Re: [PATCH 2/2 v2] xwm: Scale icon if size is not the target size

2018-03-23 Thread Derek Foreman
On 2018-03-22 01:04 AM, Scott Moreau wrote: > This scales the icon cairo surface for the titlebar if it isn't the > target size. > > shared/cairo-util: Add surface resizing function to be used for this > case and other potential cases. > --- > > Changed in v2: > > - Rebase to [PATCH 1/1 v3] xwm:

Re: [PATCH v3] xwm: Choose icon closest to target size

2018-03-23 Thread Derek Foreman
Thanks for this. This particular feature is getting on my nerves because it seemed like a simple thing and has result in a lot of breakage. Would like to see it repaired or removed by late next week. This seems to be a good step towards repair, comments inline below. On 2018-03-22 12:47 AM, Sco

Re: EXT: [PATCH weston v6 00/73] Head-based output configuration API a.k.a clone mode infrastructure

2018-03-23 Thread Ray, Ian (GE Healthcare)
> On 23 Mar 2018, at 15.12, Ray, Ian (GE Healthcare) wrote: > > >> On 16 Feb 2018, at 16.56, Pekka Paalanen wrote: >> >> From: Pekka Paalanen >> >> Hi all, >> >> here is the v6 of the shared-CRTC clone mode series. Since v5, quite >> many patches have been extracted from this series, sent

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Jason Gerecke
Nice! Do you think its reasonable to extend the allowed use of this protocol to other kinds of direct-input devices? I don't see anything which would prevent this protocol from working equally well to calibrate the pen input for a tablet PC or Cintiq for example. The compositor would need to obviou

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Matt Hoosier
On Fri, Mar 23, 2018 at 9:30 AM, Pekka Paalanen wrote: > On Fri, 23 Mar 2018 08:46:46 -0500 > Matt Hoosier wrote: > >> I am very much in favor of the overall approach on this patch series. >> I've experienced every single one of the problems described in this >> summary, and my company currently

Re: EXT: [PATCH weston v6 00/73] Head-based output configuration API a.k.a clone mode infrastructure

2018-03-23 Thread Ray, Ian (GE Healthcare)
> On 16 Feb 2018, at 16.56, Pekka Paalanen wrote: > > From: Pekka Paalanen > > Hi all, > > here is the v6 of the shared-CRTC clone mode series. Since v5, quite > many patches have been extracted from this series, sent out and merged > upstream. However, now the series is bigger than ever, bec

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Pekka Paalanen
On Fri, 23 Mar 2018 08:46:46 -0500 Matt Hoosier wrote: > I am very much in favor of the overall approach on this patch series. > I've experienced every single one of the problems described in this > summary, and my company currently resorts to maintaining a hacky > out-of-tree calibration tool to

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Matt Hoosier
I am very much in favor of the overall approach on this patch series. I've experienced every single one of the problems described in this summary, and my company currently resorts to maintaining a hacky out-of-tree calibration tool to paper over these problems. On Fri, Mar 23, 2018 at 7:00 AM, Pek

Re: EXT: [PATCH weston v6 25/73] libweston: change windowed_output_api output_create to create_head

2018-03-23 Thread Ray, Ian (GE Healthcare)
> On 23 Mar 2018, at 15.36, Ray, Ian (GE Healthcare) wrote: > >> >> On 16 Feb 2018, at 16.57, Pekka Paalanen wrote: >> >> 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

Re: EXT: [PATCH weston v6 25/73] libweston: change windowed_output_api output_create to create_head

2018-03-23 Thread Ray, Ian (GE Healthcare)
> On 16 Feb 2018, at 16.57, Pekka Paalanen wrote: > > 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 t

Re: EXT: [PATCH weston v6 23/73] weston: migrate RDP to head-based output API

2018-03-23 Thread Ray, Ian (GE Healthcare)
> On 16 Feb 2018, at 16.57, Pekka Paalanen wrote: > > 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

Re: EXT: [PATCH weston v6 22/73] weston: migrate fbdev to head-based output API

2018-03-23 Thread Ray, Ian (GE Healthcare)
> On 16 Feb 2018, at 16.57, Pekka Paalanen wrote: > > 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 fi

[PATCH weston 25/25] doc: add example calibration-helper script

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen This is not to be installed, except maybe as a doc. It is just an example of what one might do. It also has not been tested, it's just for giving an idea of what it should do. It also contains untested speculation. Signed-off-by: Pekka Paalanen --- Makefile.am

[PATCH weston 23/25] weston: add touchscreen_calibrator option

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne Add an option to enable the touchscreen calibrator interface. This is a global on/off toggle, in lack of more fine-grained access restrictions. As Weston should not hardcode system specifics, the actual permanent saving of a new calibration is left for a user

[PATCH weston 21/25] protocol: add weston_touch_calibration

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen This is a Wayland protocol extension to allow the calibration of touchscreens in Weston. See: https://phabricator.freedesktop.org/T7868 Signed-off-by: Pekka Paalanen --- Makefile.am | 5 +- protocol/weston-touch-calibration.xml | 320 ++

[PATCH weston 24/25] clients: add a new touchscreen calibrator

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne The new calibrator uses weston_touch_calibration protocol extension and provides the following features: - chooses the physical touch device to be calibrated by DEVPATH or by the output/head name; device enumeration provided - the compositor ensures the cal

[PATCH weston 15/25] libweston: unexport weston_{pointer, keyboard, touch}_{create, destroy}()

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen We have weston_seat_{init,release}_{pointer,keyboard,touch}() as the backend-facing API. There is no need to expose the create/destroy functions which have been for internal use only for quite a long time. Signed-off-by: Pekka Paalanen --- libweston/compositor.h | 12 -

[PATCH weston 17/25] libweston: fix weston_touch_start_grab() arg name

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne compositor.c has 'touch', so use 'touch' here as well. It is not a device to begin with. Signed-off-by: Louis-Francis Ratté-Boulianne Signed-off-by: Pekka Paalanen --- libweston/compositor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH weston 20/25] input: introduce touch event mode for calibrator

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne In addition to the normal touch event processing mode, introduce a new mode for calibrating a touchscreen input device. In the calibration mode, normal touch event processing is skipped, and the raw events are forwarded to the calibrator instead. The calibrato

[PATCH weston 19/25] input: do not forward unmatched touch-ups

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Commit a30e29af2e4d0ad6fc476ae7cc13c4cad5119217 introduced the code to deal with a touchscreen with touches already down when Weston starts using it. It fixed the touchpoint counting problem. However, Weston still should not forward or process the unmatched touch-ups either.

[PATCH weston 22/25] libweston: implement touch calibration protocol

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne This implements a new global interface weston_touch_calibration, which allows one client at a time to perform touchscreen calibration. This also implements the calibrator window management. A client asks to calibrate a specific physical touch device (not a wl_

[PATCH weston 18/25] input: move touchpoint counting up

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne The touchpoint counting is needed regardless of what we do with the touch events, so move it out of process_touch_normal() into the caller notify_touch_cal(). This is pure refactoring. Signed-off-by: Louis-Francis Ratté-Boulianne Signed-off-by: Pekka Paalane

[PATCH weston 14/25] libweston: notify_touch API to use weston_touch_device

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Relay touch input events into libweston core through the weston_touch_device, so that the core can tell which individual physical device they come from. This is necessary for supporting touchscreen calibration, where one needs to process a single physical device at a time in

[PATCH weston 16/25] libweston: introduce notify_touch_cal() and doc

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen notify_touch_cal() is an extended form of notify_touch(), adding normalized touch coordinates which are necessary for calibrating a touchscreen. It would be possible to invert the transformation and convert from global coordinates to normalized device coordinates in input.c

[PATCH weston 05/25] libinput: make setting the same output a no-op

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen In the future evdev_device_set_output() will start getting called more often, redundantly. Short-circuit the setting if the chosen output is already set for an input device. This reduces churn in the logs. Signed-off-by: Pekka Paalanen --- libweston/libinput-device.c | 3 +

[PATCH weston 04/25] libinput: log input device to output associations

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Helps admins ensure the configuration is correct. Signed-off-by: Pekka Paalanen --- libweston/libinput-device.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libweston/libinput-device.c b/libweston/libinput-device.c index 64d99f75..d391d63e 100644 --- a/libwest

[PATCH weston 06/25] libinput: allow evdev_device_set_output(dev, NULL)

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Removing the output association from an evdev_device is more than just setting the pointer to NULL, one also needs to remove the destroy listener and flag the destroy listener as unused (notify == NULL). evdev_device_set_output() can already remove associations, so let it al

[PATCH weston 09/25] libinput: do not switch output associations on disable

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen If an input device is associated to an output that then gets disabled, there is no case where associating to a different output would be correct. The output association is used for absolute positioned input devices, and an input device like a touchscreen cannot ever be autom

[PATCH weston 11/25] tests: add test_seat_release() for symmetry

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Add test_seat_release() as the counterpart of test_seat_init() instead of open-coding it. This helps adding more code to test_seat_release() later. Signed-off-by: Pekka Paalanen --- tests/weston-test.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletion

[PATCH weston 07/25] libinput: use head names for output matching

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Associating input devices with weston_outputs by the output name fails when one output has several heads. We need to match against head names instead of output names to be able to find all names. This fixes touchscreen output association in shared-CRTC clone mode when output

[PATCH weston 12/25] input: introduce weston_touch_device

2018-03-23 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne Introduce weston_touch_device for libweston core to track individual touchscreen input devices. A weston_seat/weston_touch may be an aggregation of several physical touchscreen input devices. Separating the physical devices will be required for implementing tou

[PATCH weston 13/25] libinput: move calibration printing into do_set_calibration()

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Move calibration printing here and call do_set_calibration() from evdev_device_set_calibration() so that all matrix setting paths print the same way. Print the matrix values in a matrix style to help readability, and mention the input device. Signed-off-by: Pekka Paalanen

[PATCH weston 08/25] libweston: require connected heads for input devices

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen The use case driving this change is a clone mode setup, where the user is hotplugging or unplugging a cloned touchscreen. Even if the output and head are force-enabled, the touch device should still follow the connector connection status. If there is no video signal for the t

[PATCH weston 10/25] man: document WESTON_LIBINPUT_LOG_PRIORITY env

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Commit c81c4241d9c9fc5f60c08177dd8a33ae4e4ddca1 added this environment variable. Document it. It applies also to the fbdev-backend but that has no man page. Signed-off-by: Pekka Paalanen --- man/weston-drm.man | 4 1 file changed, 4 insertions(+) diff --git a/man/we

[PATCH weston 03/25] libinput: deprecate WL_CALIBRATION

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen The udev property WL_CALIBRATION is an old way of giving Weston a touchscreen calibration matrix. It is Weston-specific. The recommended way of setting up a calibration is to use the udev property LIBINPUT_CALIBRATION_MATRIX, which libinput will load automatically and theref

[PATCH weston 01/25] libinput: remove evdev_device::devnode

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Struct 'evdev_device' has field 'devnode' which is initialized to NULL, never assigned, and finally free()'d. Therefore it is useless. Remove the dead field. Signed-off-by: Pekka Paalanen --- libweston/libinput-device.c | 1 - libweston/libinput-device.h | 1 - 2 files ch

[PATCH weston 02/25] libinput: note if calibrating without an output

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Print a note that calibration got skipped if the input device supports a calibration matrix but there is no associated output to compute it from. Helps with debugging touchscreen calibration issues. The code is reorganized and commented a bit, but this does not change the be

[PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen Hi all, the existing touchscreen calibrator in Weston has several problems. This proposal intends to solve them all by introducing a new protocol extension for touchscreen calibration and a new calibrator tool. The benefits of the new tool, which the old tool lacks, are: -