Re: [PATCH weston] compositor-fbdev: enumerate available fbdevs using udev

2015-03-12 Thread Philip Withnall
On Wed, 2015-03-11 at 16:05 +0200, Pekka Paalanen wrote: > On Tue, 10 Mar 2015 11:34:45 +0900 > Ryo Munakata wrote: > > > This was a TODO: > > "Ideally, available frame buffers should be enumerated > > using udev, rather than passing a device node in as a > > parameter." > > Hi, > > I'm CC'ing

Re: [PATCH weston] compositor-fbdev: enumerate available fbdevs using udev

2015-03-11 Thread Philip Withnall
On Thu, 2015-03-12 at 00:40 +0900, Ryo Munakata wrote: > On Wed, 11 Mar 2015 16:05:55 +0200 > Pekka Paalanen wrote: > > > On Tue, 10 Mar 2015 11:34:45 +0900 > > Ryo Munakata wrote: > > > > > This was a TODO: > > > "Ideally, available frame buffers should be enumerated > > > using udev, rather t

[PATCH v2] connection: Fix sendmsg() on FreeBSD

2014-11-03 Thread Philip Withnall
It expects ((msg_controllen == 0) == (msg_control == NULL)), and returns EINVAL otherwise. It can't hurt to be tidy about things on other platforms either though. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=99356#c5 Signed-off-by: Philip Withnall Signed-off-by: Karsten

Re: [PATCH 4/4] queue-test: Add another assertion

2014-11-01 Thread Philip Withnall
On Mon, 2014-09-22 at 11:56 +0300, Pekka Paalanen wrote: > On Thu, 11 Sep 2014 21:43:49 +0200 > Karsten Otto wrote: > > > From: Philip Withnall > > Date: Fri, 15 Feb 2013 12:57:23 + > > > > Ensure that the round trip succeeds. > > > > [kao: a

[PATCH 2/4] event-loop.c: Use correct OS abstraction function for dupfd()

2014-11-01 Thread Philip Withnall
Signed-off-by: Philip Withnall Signed-off-by: Karsten Otto --- src/event-loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event-loop.c b/src/event-loop.c index a149db9..1f571ba 100644 --- a/src/event-loop.c +++ b/src/event-loop.c @@ -134,7 +134,7

[PATCH 3/4] wayland-server: Abort if a read from a client gives 0 length

2014-11-01 Thread Philip Withnall
not be an issue with Wayland. This will not cause problems if the FD polls as readable but actually is not — in that case, recvmsg() will return EAGAIN. Signed-off-by: Philip Withnall Signed-off-by: Karsten Otto --- src/wayland-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/4] connection: Fix sendmsg() on FreeBSD

2014-11-01 Thread Philip Withnall
It expects ((msg_controllen == 0) == (msg_control == NULL)), and returns EINVAL otherwise. It can't hurt to be tidy about things on other platforms either though. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=99356#c5 Signed-off-by: Philip Withnall Signed-off-by: Karsten

[PATCH 4/4] queue-test: Add another assertion

2014-11-01 Thread Philip Withnall
Ensure that the round trip succeeds. Signed-off-by: Philip Withnall Signed-off-by: Karsten Otto --- tests/queue-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queue-test.c b/tests/queue-test.c index 96f2100..6e2e932 100644 --- a/tests/queue-test.c +++ b/tests

Re: Improve shell window stacking ordering

2013-12-21 Thread Philip Withnall
Hey, On Fri, 2013-12-20 at 10:51 -0800, Kristian Høgsberg wrote: > I guess I never replied to you like I usually do when I merge patches, > but I commited your patches Dec 2nd. If you have a few spare cycles, > could you have a look at this bug that look like stacking regressions > from those pat

Re: Improve shell window stacking ordering

2013-12-20 Thread Philip Withnall
On Mon, 2013-12-02 at 15:22 -0800, Kristian Høgsberg wrote: > But we need to wait for Rafaels xdg-shell patches to land first. How far away from landing are they? Regardless of how far away they are, would it make sense to commit some of the more self-contained patches from my patchset (such as p

Re: [PATCH 09/17] shell: Factor out code to set a shsurf’s parent

2013-11-28 Thread Philip Withnall
On Mon, 2013-11-25 at 19:27 -0800, Bill Spitzak wrote: > Why do you think it should not be possible to fullscreen and/or maximize > child windows? Our software certainly relies on being able to > full-screen an X transient window (thought it is triansient because we > are working around window s

[PATCH 13/17] shell: Remove weston_view_restack()

2013-11-25 Thread Philip Withnall
From: Philip Withnall It’s tied too deeply into the shell’s window stacking and ordering code to legitimately be split out into compositor.c. Inline it in the shell, and refactor some code around it a little, tidying up the stacking behaviour for fullscreen surfaces. --- src/compositor.c | 9

[PATCH 16/17] shell: Fix a potential NULL pointer dereference

2013-11-25 Thread Philip Withnall
From: Philip Withnall get_shell_surface() may return NULL. Found by scan-build. --- src/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shell.c b/src/shell.c index 79ea463..1af687a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1370,7 +1370,8

[PATCH 10/17] shell: Don’t change popups’ window types until the next configure event

2013-11-25 Thread Philip Withnall
From: Philip Withnall This standardises their behaviour with that of the other window types, where the type change is only committed on configure. --- src/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shell.c b/src/shell.c index 3ff395d..c503d4b 100644 --- a

[PATCH 11/17] shell: Factor out code to set the layer for a shsurf

2013-11-25 Thread Philip Withnall
From: Philip Withnall This will be used more extensively in the next few commits, where shsurf layering is handled more explicitly when changing the type of a surface. This commit introduces the minor functional change that map() will now always add the new surface to a layer list, as

[PATCH 01/17] shell: Reorganise set/unset methods for fullscreen/maximize/popup/transient

2013-11-25 Thread Philip Withnall
From: Philip Withnall Move them to be next to each other, and standardise the naming scheme so they’re more greppable. This should make maintenance easier. --- src/shell.c | 348 +--- 1 file changed, 190 insertions(+), 158 deletions

[PATCH 15/17] shell: Store parent–child links between shsurfs for window stacking

2013-11-25 Thread Philip Withnall
From: Philip Withnall This ensures transient surfaces are included in the layer of their parent, even if the parent later changes layers. It achieves this by recursively changing the layers of all children of a surface when that surface’s layer is changed. The recursion is unbounded unless

[PATCH 09/17] shell: Factor out code to set a shsurf’s parent

2013-11-25 Thread Philip Withnall
From: Philip Withnall This is in preparation for unifying how surface layering works. It introduces the small functional change that fullscreen, maximized and top-level surfaces now explicitly have no parent surface. Only popup and transient surfaces have a non-NULL parent. --- src/shell.c | 29

[PATCH 17/17] shell: Change stacking order calculation for popup surfaces

2013-11-25 Thread Philip Withnall
From: Philip Withnall Always put them as the top-most layer in the layer list of their parent. This ensures that, for example, the popup menu produced by right-clicking on a surface (which is not currently at the top of the stacking order in the current workspace) is displayed at the top of the

[PATCH 06/17] shell: Factor out common code to set a shsurf’s output

2013-11-25 Thread Philip Withnall
From: Philip Withnall --- src/shell.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/shell.c b/src/shell.c index 17a64ae..15895e2 100644 --- a/src/shell.c +++ b/src/shell.c @@ -2031,6 +2031,22 @@ get_output_panel_height(struct

[PATCH 08/17] shell: Tidy up unset_fullscreen()

2013-11-25 Thread Philip Withnall
From: Philip Withnall No functional changes, merely some presentational cleanup. --- src/shell.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/shell.c b/src/shell.c index 209ed30..9d6a7c2 100644 --- a/src/shell.c +++ b/src/shell.c @@ -2115,19 +2115,24

[PATCH 04/17] clients: Add window_is_transient() helper to the toy toolkit window

2013-11-25 Thread Philip Withnall
From: Philip Withnall --- clients/window.c | 6 ++ clients/window.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/clients/window.c b/clients/window.c index d9f061d..6d82f17 100644 --- a/clients/window.c +++ b/clients/window.c @@ -3935,6 +3935,12 @@ window_is_fullscreen(struct

[PATCH 07/17] shell: Refactor workspace code to operate on shsurfs rather than views

2013-11-25 Thread Philip Withnall
From: Philip Withnall This is needed for the work to refactor window stacking and ordering, as window order operates on shsurfs, not views. --- src/shell.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/shell.c b/src/shell.c index 15895e2

[PATCH 02/17] shell: Add missing cases to switch statements for surface types

2013-11-25 Thread Philip Withnall
From: Philip Withnall This fixes a load of GCC warnings when compiling with -Wswitch-enum -Wswitch-default, and makes it clearer that those cases have been thought about explicitly when writing the code, rather than just being forgotten. --- src/shell.c | 24 +++- 1 file

[PATCH 05/17] clients: Add a new weston-stacking demo

2013-11-25 Thread Philip Withnall
From: Philip Withnall This allows creation of a variety of window types, for the purposes of testing window ordering and stacking in Weston. --- clients/Makefile.am | 4 + clients/stacking.c | 301 2 files changed, 305 insertions

[PATCH 14/17] shell: Factor out common code to create fullscreen black surfaces

2013-11-25 Thread Philip Withnall
From: Philip Withnall --- src/shell.c | 66 ++--- 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/src/shell.c b/src/shell.c index 96bfea0..a505bf5 100644 --- a/src/shell.c +++ b/src/shell.c @@ -2446,6 +2446,29

[PATCH 03/17] shell: Add missing cases to switch statements for animations and fading

2013-11-25 Thread Philip Withnall
From: Philip Withnall This fixes two GCC warnings when compiling with -Wswitch-enum -Wswitch-default, and makes it clearer that those cases have been thought about explicitly when writing the code, rather than just being forgotten. --- src/shell.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH 12/17] shell: Update a shsurf’s layer when its surface type changes

2013-11-25 Thread Philip Withnall
From: Philip Withnall --- src/shell.c | 47 --- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/src/shell.c b/src/shell.c index 084d02c..25e00d9 100644 --- a/src/shell.c +++ b/src/shell.c @@ -2080,6 +2080,25

Improve shell window stacking ordering

2013-11-25 Thread Philip Withnall
Here’s a series of patches which work towards improving the shell window stacking. They clean up the code and implement a more organised approach to stacking. They add a new test client, weston-stacking, for testing window stacking and ordering. I don’t claim the ordering they impose is perfect

Re: [PATCH 02/12] event-loop: Add support for BSD???s kevent() instead of epoll()

2013-02-16 Thread Philip Withnall
On Fri, 2013-02-15 at 09:33 -0600, Jason Ekstrand wrote: > Would it be a better overall solution if we simply replace timerfd and > signalfd with a more generic architecture and then move the guts of > the event loop to poll or select? Another idea that was brought up on > IRC this last weekend wa

[PATCH 12/12] wayland-server.c: Fix dereferencing types of new objects

2013-02-15 Thread Philip Withnall
The type should be stored in the same location as the argument. This fixes the test suite on FreeBSD. Signed-off-by: Philip Withnall --- src/wayland-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 8eef048..a6966e1

[PATCH 11/12] queue-test: Add another assertion

2013-02-15 Thread Philip Withnall
Ensure that the round trip succeeds. Signed-off-by: Philip Withnall --- tests/queue-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queue-test.c b/tests/queue-test.c index c9d3668..da2b237 100644 --- a/tests/queue-test.c +++ b/tests/queue-test.c @@ -86,7 +86,7

[PATCH 10/12] tests: Use /dev/fd on FreeBSD to determine open FDs

2013-02-15 Thread Philip Withnall
FreeBSD doesn’t have /proc/self/fd; it uses fdescfs instead, which must be mounted explicitly before the test suite can be run, using: mount -f fdescfs fdescfs /dev/fd Signed-off-by: Philip Withnall --- tests/test-helpers.c | 22 +++--- 1 file changed, 19 insertions(+), 3

[PATCH 09/12] tests: Update test suite to work on FreeBSD

2013-02-15 Thread Philip Withnall
• Add missing #includes which FreeBSD needs. • Disable leak checking because malloc() and friends can’t be overridden. • Use waitpid() instead of waitid() (which doesn’t exist on FreeBSD). Signed-off-by: Philip Withnall --- configure.ac| 7 +++ tests/queue-test.c | 5

[PATCH 08/12] wayland-server: Abort if a read from a client gives 0 length

2013-02-15 Thread Philip Withnall
This happens if the socket has been gracefully closed. Signed-off-by: Philip Withnall --- src/wayland-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 614dd2f..8eef048 100644 --- a/src/wayland-server.c +++ b/src

[PATCH 07/12] wayland-os: Always use CLOEXEC fallbacks on FreeBSD

2013-02-15 Thread Philip Withnall
FreeBSD doesn’t support useful flags like SOCK_CLOEXEC, so we have to suffer the race condition and always use the fcntl(F_SETFD, FD_CLOEXEC) fallback on FreeBSD. This also requires disabling some tests which test whether the fallbacks have been hit. Signed-off-by: Philip Withnall --- src

[PATCH 06/12] event-loop.c: Use correct OS abstraction function for dupfd()

2013-02-15 Thread Philip Withnall
Signed-off-by: Philip Withnall --- src/event-loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event-loop.c b/src/event-loop.c index 05baa48..6330763 100644 --- a/src/event-loop.c +++ b/src/event-loop.c @@ -220,7 +220,7 @@ wl_event_loop_add_fd(struct wl_event_loop

[PATCH 05/12] event-loop-test: Add some more assertions and work around a FreeBSD bug

2013-02-15 Thread Philip Withnall
There’s a bug in FreeBSD’s handling of timer events which means we have to be more relaxed about how we check when timer events have happened because FreeBSD can’t manage enough precision on scheduling the events. Signed-off-by: Philip Withnall --- tests/event-loop-test.c | 22

[PATCH 04/12] configure: Use AC_CHECK_LIB() to find libdl

2013-02-15 Thread Philip Withnall
This is necessary on FreeBSD. Signed-off-by: Philip Withnall --- configure.ac | 4 tests/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3ad39ab..35b89c8 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,10

[PATCH 03/12] server: Add support for BSD’s xucred credentials

2013-02-15 Thread Philip Withnall
This is an alternative to the traditional ucred on Linux. Signed-off-by: Philip Withnall --- configure.ac | 3 ++ src/wayland-server.c | 33 +++ src/wayland-shm.c| 91 +++- 3 files changed, 126 insertions(+), 1

[PATCH 02/12] event-loop: Add support for BSD???s kevent() instead of epoll()

2013-02-15 Thread Philip Withnall
This is a large step towards supporting the BSDs. There’s quite a lot of little in the test suite). Signed-off-by: Philip Withnall --- configure.ac | 8 ++ src/event-loop.c | 361 +-- src/wayland-os.c | 23 ++- src

[PATCH 01/12] connection: Fix sendmsg() on FreeBSD

2013-02-15 Thread Philip Withnall
It expects ((msg_controllen == 0) == (msg_control == NULL)), and returns EINVAL otherwise. It can’t hurt to be tidy about things on other platforms either though. See: http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/99356#reply2 Signed-off-by: Philip Withnall --- src/connection.c | 13

Re: [PATCH] connection: Add some documentation to wl_connection_demarshal()

2013-02-08 Thread Philip Withnall
On Thu, 2013-02-07 at 21:13 -0500, Kristian Høgsberg wrote: > On Mon, Feb 04, 2013 at 11:21:46AM +0000, Philip Withnall wrote: > > Signed-off-by: Philip Withnall > > --- > > src/connection.c | 62 > > > &g

[PATCH] connection: Add some documentation to wl_connection_demarshal()

2013-02-04 Thread Philip Withnall
Signed-off-by: Philip Withnall --- src/connection.c | 62 1 file changed, 62 insertions(+) diff --git a/src/connection.c b/src/connection.c index 141875e..531255a 100644 --- a/src/connection.c +++ b/src/connection.c @@ -444,6 +444,8

[PATCH v4] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-02-02 Thread Philip Withnall
-packed formats (interleaved, planes, etc.) • Non-true-colour formats (monochrome, greyscale, etc.) • Big-endian formats (with component MSBs on the right) • Non-RGBA and non-ARGB formats Signed-off-by: Philip Withnall --- configure.ac | 10 + src/Makefile.am| 24 +-

Alignment problem in wl_connection_demarshal()

2013-02-01 Thread Philip Withnall
Hi all, Running Weston on 64-bit MIPS, I'm coming across a non-aligned access in wl_connection_demarshal() which causes a processor trap. Around line 740 of connection.c, demarshalling an object: id = (uint32_t **) extra; extra += sizeof *id; closure->args[i] = id;

[PATCH v3] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-01-22 Thread Philip Withnall
monochrome, greyscale, etc.) • Big-endian formats (with component MSBs on the right) • Non-RGBA and non-ARGB formats Signed-off-by: Philip Withnall --- configure.ac | 10 + src/Makefile.am| 27 +- src/compositor-fbdev.c | 960 +++

Re: [PATCH] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-01-18 Thread Philip Withnall
On Fri, 2013-01-18 at 13:09 +0200, Pekka Paalanen wrote: > > > Why not discover that device via udev? That would avoid any hard-coded > > > paths. And you could do an fbdev_output_create() on all fbdev devices > > > you find. > > > > Good idea. It's not on my list of priorities though, since I (co

[PATCH v2] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-01-18 Thread Philip Withnall
anes, etc.) • Non-true-colour formats (monochrome, greyscale, etc.) • Big-endian formats (with component MSBs on the right) • Non-RGBA and non-ARGB formats Signed-off-by: Philip Withnall --- configure.ac | 10 + src/Makefile.am| 26 +-

Re: [PATCH] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-01-18 Thread Philip Withnall
On Wed, 2013-01-16 at 12:02 +0200, Pekka Paalanen wrote: > What do you have in mind for polishing? If it is the evdev and VT code > sharing between several backends, you will find that the android > backend will make it not so nice. IMO we could merge fbdev backend, and > refactor code later. I mo

Re: [PATCH] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-01-18 Thread Philip Withnall
I haven't checked all of it, but some comments below. > > Thanks > David > > On Tue, Jan 15, 2013 at 3:08 PM, Philip Withnall > wrote: > > This is an initial version of an fbdev backend for Weston. I don't > > consider it polished; I'm just look

[PATCH] fbdev: Add an fbdev compositor backend using pixman and evdev

2013-01-15 Thread Philip Withnall
else. Much of the code came straight from the rpi backend (and copyright has been attributed accordingly). The behaviour of this backend on less modern frame buffers has yet to be tested. Signed-off-by: Philip Withnall --- configure.ac | 10 + src/Makefile.am| 26 +- src/