[PATCH wayland] protocol: when buffer transform and scale change

2014-02-07 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Clarify when the pending and current buffer transform and scale values change, and what exactly happens on commit. This matches what Weston currently does. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- protocol/wayland.xml

[PATCH weston 1/2] build: pass client flags to test programs

2014-02-03 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Fix build failures of the kind: CC tests/bad-buffer-test.o In file included from tests/weston-test-client-helper.h:28:0, from tests/bad-buffer-test.c:28: ./protocol/wayland-test-client-protocol.h:35:28: fatal error:

[PATCH weston] protocol: rename wl_surface_scaler to wl_viewport

2014-01-08 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk This seems like a better name, and will not conflict if someone later extends wl_surface with a request scaler_set (yeah, unlikely). This code was written by Jonny Lamb, I just diffed his branches and made a patch for Weston. Cc: Jonny Lamb

[PATCH weston] screenshooter: silence a warning

2014-01-08 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk screenshooter.c: In function ‘recorder_binding’: screenshooter.c:509:5: warning: ‘listener’ may be used uninitialized in this function [-Wuninitialized] This was not really a problem so far, because the variable was uninitialized only in the

[PATCH weston] tests: Only run buffer-count test on Mesa = 10.1

2014-01-08 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Comment #2 in the bug report says Mesa 10.0 branch does not have the fix, and indeed buffer-count test fails on Mesa 10.0.1. Fix the test to require Mesa 10.1 or later. Now I correctly get: mesa version too old (OpenGL ES 3.0 Mesa

[PATCH wayland-web] update xserver and wayland DDX branches

2013-12-11 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk After the update, you get the latest xserver branch, which at the time of writing is based on xserver 1.14.99. You also get the latest xf86-video-wayland, which was renamed from xf86-video-wlshm. --- Hi, is there any reason to not have these

[PATCH weston 1/4] gl: fix fallback definition of EGL_DEFAULT_DISPLAY

2013-12-04 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Compiling fbdev backend on RaspberryPi caused the following warning: compositor-fbdev.c: In function 'fbdev_compositor_create': compositor-fbdev.c:929:6: warning: passing argument 2 of 'gl_renderer-create' makes integer from pointer without a

[PATCH weston 2/4] rpi: compile in the common udev code

2013-12-04 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk In a recent commit 37d38d932cea8a642e644d091747d0d9c046a00a, rpi: Use common udev_input for input device handling, the rpi-backend was made to use the common udev code. It just forgot to actually build the common udev code into the rpi-backend.

[PATCH weston 3/4] rpi: seat quick fix

2013-12-04 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Fix the default seat name, so that we can find the input devices by default. This is just a quick fix. Further enhancement would be to make the default seat on rpi taken from a command line option like the other backends do. Furthermore,

[PATCH weston 4/4] rpi: launcher must init before udev-seat

2013-12-04 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk udev-seat will call weston_launcher_open(), so we better init launcher first. Fixes a segfault. Cc: Jonas Ådahl jad...@gmail.com Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- src/compositor-rpi.c | 24

[PATCH wayland-web] rpi: update the build guide

2013-12-04 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Updates necessary for building and using Weston from upstream master branch. - note that recent raspberrypi.org images come with an old Weston - update the dependency list - update the env setup to match the general guide - libxkbcommon is

[PATCH wayland 1/2] os: use posix_fallocate in creating sharable buffers

2013-11-29 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk If posix_fallocate is available, use it instead of ftruncate. Unlike ftruncate, when posix_fallocate succeeds, it guarantees that you cannot run out of disk space, when later writing to the mmap()'ed file. With posix_fallocate, if

[PATCH wayland 2/2] cursor: handle running out of buffer space

2013-11-29 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk If posix_fallocate is available, use it to detect when we are running out of buffer space. Propagate the failure properly through the various functions, stopping loading cursors but keeping the cursors that were already successfully loaded.

[PATCH weston 1/2] os: use posix_fallocate in creating sharable buffers

2013-11-29 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk If posix_fallocate is available, use it instead of ftruncate. Unlike ftruncate, when posix_fallocate succeeds, it guarantees that you cannot run out of disk space, when later writing to the mmap()'ed file. With posix_fallocate, if

[PATCH weston 2/2] window: handle insufficient buffer space

2013-11-29 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk It is quite possible for os_create_anonymous_file() to fail when trying to allocate a new wl_shm buffer. Propagate this failure out from shm_surface_prepare. Most parts of toytoolkit are already avoiding NULL cairo surfaces. If cairo surface

[PATCH weston] tests: add a test causing SIGBUS to the compositor

2013-11-21 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk This tests the wl_shm buffer access wrappers, that are supposed to catch the invalid accesses to a memory-mapped file beyond EOF. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- v2: call it bad-buffer instead ---

[PATCH weston 2/3] tests: allow weston test plugin to keep on running

2013-11-21 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk If the environment variable WESTON_TEST_CLIENT_PATH is not set, do not quit Weston in the test plugin. This allows one to start Weston with the test plugin manually, and then run any tests also manually, while observing Weston's behaviour over

[PATCH weston] compositor: fix sub-surface view stacking order

2013-11-19 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk If you opened a window with sub-surfaces, and then raised another window on top of that, the underlaying window's main surface was stacked properly, but the sub-surfaces remained on top of the raised window. IOW, the raised window was in between

[PATCH wayland] protocol: add sub-surfaces to the core

2013-11-15 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk The sub-surface protocol was originally committed into Weston on May 10th, 2013, in commit 2396aec6842c709a714f3825dbad9fd88478f2e6. The design for the protocol had started in the beginning of December 2012. I think it is high time to move this

[PATCH weston] protocol: move sub-surfaces to Wayland

2013-11-15 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk This reverts commit 2396aec6842c709a714f3825dbad9fd88478f2e6. This exact version of the sub-surface protocol has been copied into Wayland core. Therefore it must be removed from here to avoid build conflicts and useless duplication. No other

[PATCH weston] shared: build fix for config-parser test

2013-06-05 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk One more wayland-util.h not found issue, triggered by having libwayland installed to a custom prefix. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- shared/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH weston] shared: fix build of libshared-cairo

2013-06-04 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Another case of missing wayland-util.h, as we didn't pass any libwayland CFLAGS. This is triggerable on a system, where libwayland is installed in a custom prefix, and pixman, cairo, libpng, and webp are either not installed or are installed in

[PATCH wayland-web] raspberrypi: more accurate on dependencies

2013-06-03 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Either libraspberrypi-dev package or running rpi-update is needed to get the display API libraries. It's not strictly necessary to use rpi-update, but I don't know how old firmware and libs are in the Raspbian packages, so recommend it still.

[PATCH wayland-web] raspberrypi: mention Raspbian packages

2013-06-03 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk Cc: Daniel Stone dan...@fooishbar.org Cc: Alex Bradbury a...@asbradbury.org --- Darxus, could you wait till tomorrow until pushing this, so Daniel and Alex can comment, if there's

[PATCH weston] compositor-x11: fix default output scale

2013-05-23 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Default output scale of 256 makes little sense. Actually this is a type mismatch between wl_fixed and int, probably a leftover from when the scale factor was proposed as a fixed point number. Scale 256 probably causes the Window creation to

[PATCH weston] window: avoid a gcc warning in buffer release handler

2013-05-22 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Apparently some compilers complain about set but not used variables 'available' and 'bufs', but I don't get the warning. Still, separate the debugging code from shm_surface_buffer_release(), so that we only compute 'bufs' when it is printed.

[PATCH weston 00/18] Raspberry Pi: a new renderer and demos

2013-05-22 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Hi all, this patch series consists of several independent features, which all come together in demonstrating the capabilities of Raspberry Pi for running a desktop. We add a new rpi-renderer, that replaces the gl-renderer + weston_planes on

[PATCH weston 01/18] compositor: add capability flag for arbitrary surface rotation

2013-05-22 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com The upcoming rpi-renderer cannot handle arbitrary rotations. Introduce Weston capability bits, and add a bit for arbitrary rotation. GL and Pixman renderers support it. Shell or any other module must not produce surface transformations with rotation, if

[PATCH weston 02/18] compositor: add capability CAPTURE_YFLIP

2013-05-22 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com Both GL and pixman renderer (pixman probably only because GL did?) return the screen capture image as y-flipped, therefore Weston y-flips it again. However, the future rpi-renderer can produce only right-way-up (non-flipped) screen captures, and does not

[PATCH weston 04/18] rpi: switch to rpi-renderer

2013-05-22 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com Replace the GL renderer with the new rpi-renderer on the Raspberry Pi backend. This makes Weston on rpi not use EGL or GL anymore, at all. The weston_plane feature is disabled, since the rpi-renderer does the same, but better. Add a command line option

[PATCH weston 05/18] rpi: remove weston_plane support

2013-05-22 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com There is no need to support weston_plane anymore. The max-planes option is removed as unused. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- src/compositor-rpi.c | 727 --- 1 file changed,

[PATCH weston 06/18] shell: wait for desktop-shell init before fade in

2013-05-22 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com On Raspberry Pi, weston-desktop-shell is so slow to start, that the compositor has time to run the fade-in before the wallpaper is up. The user launching Weston sees the screen flipping to black, the fbcon fading in, and then the desktop popping up. To

[PATCH weston 07/18] desktop-shell: new wallpaper mode scale-crop

2013-05-22 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com Scale-crop mode scales the wallpaper to tightly fill the whole output, but preserving wallpaper aspect ratio. If aspect ratio differs from the output's, the wallpaper is centered cutting it from top/bottom or left/right. Add this to the weston.ini man

[PATCH weston 08/18] toytoolkit: Make the window resizing optimization optional

2013-05-22 Thread ppaalanen
From: Louis-Francis Ratté-Boulianne l...@collabora.com Whether or not a shm pool is used for resizing is now configurable at build time (--disable-resize-optimization). [pq: removed an unnecessary hunk from the patch] --- clients/window.c | 2 ++ configure.ac | 7 +++ 2 files changed, 9

[PATCH weston 09/18] screenshooter: print info to log

2013-05-22 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk Print the recording info to Weston log, not stderr. Also fix the frame counter. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- src/screenshooter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH weston 10/18] animation, shell: add kbd focus change animation

2013-05-22 Thread ppaalanen
From: Louis-Francis Ratté-Boulianne l...@collabora.com When enabled, this will make all but the keyboard-focused window dim. Also the background gets dimmed, if there are any windows open. The panel is not dimmed. When the keyboard focus changes, the change in dimming is animated. The dimming

[PATCH weston 11/18] animation: Make zoom animation renders better and smoother

2013-05-22 Thread ppaalanen
From: Louis-Francis Ratté-Boulianne l...@collabora.com Don't scale to a size smaller than 1/8 the surface size Adjust spring parameters so we don't go over the target value --- src/animation.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/animation.c

[PATCH weston 12/18] compositor, shell: Add animation to measure desktop fps

2013-05-22 Thread ppaalanen
From: Louis-Francis Ratté-Boulianne l...@collabora.com On the first output, count the number of frames rendered for each second, and report the fps in the Weston log. To ensure a busy rendering loop, the debug key binding starting the measurement also creates a bouncing box animation on screen.

[PATCH weston 13/18] Add modifier-only binding

2013-05-22 Thread ppaalanen
From: Daniel Stone dan...@fooishbar.org Add the ability to bind to modifiers; the binding is armed when a key which sets the requested modifier is pressed, and triggered if the key is released with no other keys having been pressed in the meantime, as well as mouse buttons or scroll axes. This

[PATCH weston 14/18] Add move/scale animation

2013-05-22 Thread ppaalanen
From: Daniel Stone dan...@fooishbar.org Add an animation which moves a surface to a new location, at the same time as also rescaling it to a different size from the origin, rather than the existing scale animation which resizes from the centre. Signed-off-by: Daniel Stone dan...@fooishbar.org

[PATCH weston 15/18] Shell: Add Exposay

2013-05-22 Thread ppaalanen
From: Daniel Stone dan...@fooishbar.org Exposay provides window overview functions which, when a key which produces the binding modifier is pressed on its own, scales all currently-open windows down to be shown overlaid on the desktop, providing keyboard and mouse navigation to be able to switch

[PATCH weston 16/18] configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS

2013-05-22 Thread ppaalanen
From: Daniel Stone dan...@fooishbar.org AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar macros to expose the largest extent of functionality supported by the underlying system. This is required since these macros are often limiting rather than merely additive, e.g.

[PATCH weston 17/18] xwayland: Fix the race condition when mapping a surface

2013-05-22 Thread ppaalanen
From: Louis-Francis Ratté-Boulianne l...@collabora.com Make sure XCB_MAP_NOTIFY has been received and the window id has been set before mapping the shell surface. It fixes race condition making the surface appears at wrong coordinates or with wrong size. --- src/xwayland/window-manager.c | 18

[PATCH weston 18/18] shell: Fix calculation of center point in surface rotation

2013-05-22 Thread ppaalanen
From: Louis-Francis Ratté-Boulianne l...@collabora.com --- src/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell.c b/src/shell.c index e46c30f..757d98d 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3092,8 +3092,8 @@ surface_rotate(struct shell_surface

[PATCH wayland-web] raspberrypi: update for the new rpi-backend

2013-05-22 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk This depends on the rpi-renderer patch series for Weston. Update the build instructions for the current state of Weston, remove options that do not exist anymore, add some more troubleshooting issues. Signed-off-by: Pekka Paalanen

[PATCH weston 1/6] protocol: improve sub-surface spec wording

2013-05-17 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com Mention, that sub-surfaces are not clipped to the parent. Be more accurate on surface commit vs. apply state. Mention the initial stacking order. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- protocol/subsurface.xml | 27

[PATCH weston 2/6] tests: add sub-surface tree destruction permutations

2013-05-17 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com Add a test for varying the object destruction order in a complex sub-surface tree. This test attemps to fuzz the destruction of a sub-surface tree to make sure the server does not crash on any wl_surface or wl_subsurface destruction sequence.

[PATCH weston 3/6] protocol: set_desync should flush

2013-05-17 Thread ppaalanen
From: Pekka Paalanen ppaala...@gmail.com wl_subsurface.set_desync should apply the cached wl_surface state. Otherwise, the sub-surface may be stuck: a commit on the parent surface, if desynchronized, will not commit the sub-surface because it is desynchronized, too. A commit on the sub-surface

[PATCH weston 4/6] tests: add a sub-surface nesting loop test

2013-05-17 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk It should not be possible to create a loop by nesting sub-surfaces. Currently Weston fails this test. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- tests/subsurface-test.c | 22 ++ 1 file changed, 22

[PATCH weston 5/6] compositor: forbid sub-surface nesting loops

2013-05-17 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk The only way to create a sub-surface loop by recursive nesting is to make the main surface (which does not have a role) a sub-surface of any of its sub-surfaces. All other cases should already be cought. This change checks for that exact case,

[PATCH weston 6/6] protocol: remove an unused sub-surface error code

2013-05-17 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk This was left over from allowing nesting. Signed-off-by: Pekka Paalanen pekka.paala...@collabora.co.uk --- protocol/subsurface.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/protocol/subsurface.xml b/protocol/subsurface.xml index