Re: array and enum attributes (Was: [PATCH] xdg-shell: add draw states for xdg_surface)

2016-07-29 Thread Nils Chr. Brause
Hi! On Fri, Jul 29, 2016 at 10:52 AM, Pekka Paalanen wrote: > On Fri, 22 Jul 2016 21:39:20 +0200 > "Nils Chr. Brause" wrote: > >> HI, >> >> On Thu, Jun 2, 2016 at 10:30 AM, Pekka Paalanen wrote: >> > On Thu, 2 Jun 2016 15:39:47

[PATCH weston v3 5/5] shared: Test cases for safe_strtoint()

2016-07-29 Thread Bryce Harrington
Loosely derived from an earlier patch by Imran Zaman. Signed-off-by: Bryce Harrington --- Makefile.am | 7 compositor/main.c | 7 ++-- compositor/systemd-notify.c | 9 ++--- libweston/compositor.c | 9 ++--- libweston/libbacklight.c

[PATCH weston v3 1/5] Standardize error checking for strtol calls

2016-07-29 Thread Bryce Harrington
This tightens up the strtol() error checking in several places where it is used for parsing environment variables, and in the backlight interface that is reading numbers from files under /sys/class/backlight. All of these uses are expecting strings containing decimal numbers and nothing else, so

[PATCH weston v3 0/5] Add safe_strtoint() helper

2016-07-29 Thread Bryce Harrington
This rolls together two earlier patchsets. First, the 3 patches to the remaining strtol calls look more consistent. Second, the implementation for the safe_strtoint() call. Tacked on are some test cases inspired by work by Imran Zaman a couple years ago. These patches could be squashed

[PATCH weston v3 3/5] option-parser: Improve error checking for strtol call

2016-07-29 Thread Bryce Harrington
Make the error checking consistent with other strtol() calls. Note that since strtol(nptr, ) sets endptr == nptr if there were no digits, this catches the case where the string was blank, so there's no need to test *value != '\0'. Signed-off-by: Bryce Harrington ---

[PATCH weston v3 2/5] xwayland: Improve error checking for strtol call

2016-07-29 Thread Bryce Harrington
This updates the error checking for the strtol() call in xwayland's create_lockfile to match other cases. C.f. cbc05378 and other recent patches. A notable difference here is that the existing error checking was verifying that exactly 10 digits were being read from the lock file, but the fact

[PATCH weston v3 4/5] Add safe_strtoint() helper

2016-07-29 Thread Bryce Harrington
Adds a safe strtol helper function, modeled loosely after Wayland scanner's strtouint. This encapsulates the various quirks of strtol behavior, and streamlines the interface to just handling base-10 numbers with a simple true/false error indicator and a uint32_t return by reference.

Re: Two wayland connection in single process context

2016-07-29 Thread Pekka Paalanen
On Fri, 29 Jul 2016 17:53:38 +0530 Vikas Patil wrote: > On Fri, Jul 29, 2016 at 4:53 PM, Pekka Paalanen wrote: > > On Fri, 29 Jul 2016 15:03:39 +0530 > > Vikas Patil wrote: > > > >> On Fri, Jul 29, 2016 at 1:17 PM, Pekka

Re: Two wayland connection in single process context

2016-07-29 Thread Vikas Patil
On Fri, Jul 29, 2016 at 4:53 PM, Pekka Paalanen wrote: > On Fri, 29 Jul 2016 15:03:39 +0530 > Vikas Patil wrote: > >> On Fri, Jul 29, 2016 at 1:17 PM, Pekka Paalanen wrote: >> >> > On Wed, 27 Jul 2016 17:06:04 +0530 >> > Vikas

[PATCH 6/7] fullscreen-shell: Remap surfaces when attaching a primary output

2016-07-29 Thread Armin Krezović
When no outputs are present, and no output resource was given, a fullscreen surface won't get configured because the default behavior when there is no output resource given is to create the same surface on all fullscreen outputs. This patch makes the shell reconfigure the surface as soon as an

[PATCH 4/7] compositor: Mark all views as dirty when all outputs are gone

2016-07-29 Thread Armin Krezović
When all outputs are gone and views were created before they were gone, all views would have an output that points to a destroyed object. Instead, mark the view as dirty and set the view output to NULL so a view gets an output assigned as soon as it gets plugged in. Signed-off-by: Armin Krezović

[PATCH 7/7] fullscreen-shell: Keep fullscreen surface after all outputs are gone

2016-07-29 Thread Armin Krezović
Currently, when all outputs are gone (all views are gone), a surface is unmapped and destroyed, even though the client is still running. This utilizes the previously added code to remap the surface when a new output gets attached. Signed-off-by: Armin Krezović ---

[PATCH 3/7] gl-renderer: Make dummy surface current after all outputs are gone

2016-07-29 Thread Armin Krezović
When all outputs are gone, there are no current read/write surfaces associated with a context. This makes the previously created dummy surface current until an output gets attached to avoid any potential crashes. Signed-off-by: Armin Krezović ---

[PATCH 5/7] fullscreen-shell: Add helpers for managing surfaces on zero outputs

2016-07-29 Thread Armin Krezović
This adds helper functions for managing fullscreen surfaces outside of fullscreen outputs. Signed-off-by: Armin Krezović --- fullscreen-shell/fullscreen-shell.c | 55 + 1 file changed, 55 insertions(+) diff --git

[PATCH 2/7] compositor-drm: Do not exit when there are no outputs left

2016-07-29 Thread Armin Krezović
When there are no outputs left after a hotplug event, weston will terminate. This isn't desired when trying to get weston to work with zero outputs. Signed-off-by: Armin Krezović --- libweston/compositor-drm.c | 4 1 file changed, 4 deletions(-) diff --git

Re: Two wayland connection in single process context

2016-07-29 Thread Pekka Paalanen
On Fri, 29 Jul 2016 15:03:39 +0530 Vikas Patil wrote: > On Fri, Jul 29, 2016 at 1:17 PM, Pekka Paalanen wrote: > > > On Wed, 27 Jul 2016 17:06:04 +0530 > > Vikas Patil wrote: > > > >> Dear All, > >> > >> Could you

Re: Two wayland connection in single process context

2016-07-29 Thread Vikas Patil
On Fri, Jul 29, 2016 at 1:17 PM, Pekka Paalanen wrote: > On Wed, 27 Jul 2016 17:06:04 +0530 > Vikas Patil wrote: > >> Dear All, >> >> Could you comment/suggest on following approach of using two different >> wayland connection in single process? >> >>

How to pick the initial (output) scale for a surface?

2016-07-29 Thread Pekka Paalanen
On Sat, 23 Jul 2016 18:03:59 +0200 Quentin Glidic wrote: > Hi everyone, > > Today I played with a little protocol to supports docks, implementing a > simple client and a weston plugin to test it. > Reusing code from another client of mine, I faced an issue I

Re: [PATCH wayland-protocols 3/4 v2] xdg-shell: Add resize_x/y constrain adjustment to positioner

2016-07-29 Thread Jonas Ådahl
On Fri, Jul 29, 2016 at 10:58:47AM +0200, Quentin Glidic wrote: > On 29/07/2016 06:04, Jonas Ådahl wrote: > > In order to get feedback of available space where a client can create > > its popup, let it create requset that its popup rectangle being resized > > would it not fit the within the work

Re: [PATCH wayland-protocols 3/4 v2] xdg-shell: Add resize_x/y constrain adjustment to positioner

2016-07-29 Thread Quentin Glidic
On 29/07/2016 06:04, Jonas Ådahl wrote: In order to get feedback of available space where a client can create its popup, let it create requset that its popup rectangle being resized would it not fit the within the work area. This adds two new constrain adjustment values to the adjustment enum,

Re: array and enum attributes (Was: [PATCH] xdg-shell: add draw states for xdg_surface)

2016-07-29 Thread Pekka Paalanen
On Fri, 22 Jul 2016 21:39:20 +0200 "Nils Chr. Brause" wrote: > HI, > > On Thu, Jun 2, 2016 at 10:30 AM, Pekka Paalanen wrote: > > On Thu, 2 Jun 2016 15:39:47 +0800 > > Jonas Ådahl wrote: > > > >> On Thu, Jun 02, 2016 at

Re: [PATCH wayland-protocols 4/4] xdg-shell: Drop desktop environment specific state allocations

2016-07-29 Thread Quentin Glidic
On 29/07/2016 06:04, Jonas Ådahl wrote: Instead of allocating state ranges that desktop environments can use as they want, let them introduce their own protocol and their own enums. If such desktop environment protocols need the configure/ack_configure semantics, they can design their protocols

Re: Two wayland connection in single process context

2016-07-29 Thread Pekka Paalanen
On Wed, 27 Jul 2016 17:06:04 +0530 Vikas Patil wrote: > Dear All, > > Could you comment/suggest on following approach of using two different > wayland connection in single process? > > First wayland connection for creating wl_shm backed wayland surface > for receiving