platform/upstream/weston.git
9 years agopackaging: Bump to 1.7.0
Manuel Bachmann [Sat, 14 Feb 2015 23:29:09 +0000 (00:29 +0100)]
packaging: Bump to 1.7.0

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Droped conflicts :

31d9909... downstream: allow regular users to launch Weston
b7c0823... logind: forward Active=true changes for non-DRM backends

Change-Id: If344776827a8c6ab6d6d4a98ea5ce38e150b8082
Bug-Tizen: TC-2476
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoshell: support new function "xdg_surface_needs_attention"
Nicolas Guyomard [Thu, 4 Dec 2014 14:41:35 +0000 (15:41 +0100)]
shell: support new function "xdg_surface_needs_attention"

Clients can now unminimize themselves. They will be shown in the
foreground when doing so.

Change-Id: I57db63e717ad52ac88b9af0dd1a7975ccbf828fb

9 years agopackaging: use libva if available
Philippe Coval [Mon, 1 Dec 2014 14:20:12 +0000 (15:20 +0100)]
packaging: use libva if available

Change-Id: I8fdc4ea28f89f31b935af98a831e70170afd3549
Bug-Tizen: TC-236/2of2
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoFix show_input_panel_surface crash when no surface has focus
Nicolas Guyomard [Thu, 4 Dec 2014 14:43:22 +0000 (15:43 +0100)]
Fix show_input_panel_surface crash when no surface has focus

Change-Id: Ia5105e9c7173a75ec166db170624fa7c9963820a

9 years agoThis vfunc lets us read out a rectangle of pixels from the currently attached surface...
Kristian Høgsberg [Wed, 29 Jan 2014 06:55:09 +0000 (15:55 +0900)]
This vfunc lets us read out a rectangle of pixels from the currently attached surface buffer.

Change-Id: Ia12d01fd0d157654602a2c46dd5874218252dd2f

9 years agoAdded string conversion utility functions
Imran Zaman [Tue, 18 Nov 2014 14:07:11 +0000 (16:07 +0200)]
Added string conversion utility functions

Change-Id: I50900852311604a8c31313bbfb1d137c495d2269
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
9 years agocompositor-drm: Work around page flip not setting tiling mode on BYT
Quanxian Wang [Thu, 25 Sep 2014 02:04:11 +0000 (04:04 +0200)]
compositor-drm: Work around page flip not setting tiling mode on BYT

The page flip ioctl() doesn't switch the tiling mode on BYT. That causes
cause display corruption when doing the renderer switch, since the dumb
buffer is untiled and the back buffers used by the GL renderer are use
X tiling.

Change-Id: I2f03ac44c1aa15e15b5a2a394932e94af2654124
Author: Quanxian Wang <quanxian.wang@intel.com>
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
9 years agodownstream: Hack to allow selecting a default output
Rafael Antognolli [Thu, 25 Sep 2014 01:57:09 +0000 (03:57 +0200)]
downstream: Hack to allow selecting a default output

This code originally by Rafael Antognolli <rafael.antognolli@intel.com>
was commited by Stephane Desneux <stephane.desneux@open.eurogiciel.org>
as a packaging patch.

Change-Id: I9c8a452b0bd9369217578fdf6cf43d86e11f45c6
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
9 years agodownstream: allow regular users to launch Weston
Stephane Desneux [Thu, 25 Sep 2014 01:42:25 +0000 (03:42 +0200)]
downstream: allow regular users to launch Weston

Change-Id: I04ac3457aebdcd629ee70e6915f71bce89f9cea8
Author:    Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
9 years agopackaging: Bump to 1.6.0
Manuel Bachmann [Thu, 25 Sep 2014 01:25:57 +0000 (03:25 +0200)]
packaging: Bump to 1.6.0

Change-Id: Ia40f3b13078b77dd74d2a29b069768e98fab7f5e
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
9 years agoconfigure.ac: bump to version 1.8.0 for the official release 1.8.0
Bryce Harrington [Tue, 2 Jun 2015 23:23:53 +0000 (16:23 -0700)]
configure.ac: bump to version 1.8.0 for the official release

9 years agointernal-screenshot-test: ignore output image
Derek Foreman [Thu, 28 May 2015 15:28:07 +0000 (10:28 -0500)]
internal-screenshot-test: ignore output image

In the future we should probably consider making all tests that output
images use an easily ignored template.

For now let's ignore this one individually.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agoreleasing: Convert tabs to spacing for better formatting
Bryce Harrington [Thu, 28 May 2015 06:55:08 +0000 (23:55 -0700)]
releasing: Convert tabs to spacing for better formatting

9 years agoreleasing: Document usage for the new public-doc script
Bryce Harrington [Wed, 27 May 2015 22:33:27 +0000 (15:33 -0700)]
releasing: Document usage for the new public-doc script

9 years agoreleasing: Use version number variable
Bryce Harrington [Wed, 27 May 2015 20:06:59 +0000 (13:06 -0700)]
releasing: Use version number variable

9 years agoreleasing: Add mention of the new register_release helper script
Bryce Harrington [Wed, 27 May 2015 20:03:42 +0000 (13:03 -0700)]
releasing: Add mention of the new register_release helper script

9 years agoRevert "gitignore: Ignore generated header test files"
Bryce Harrington [Wed, 27 May 2015 06:22:19 +0000 (23:22 -0700)]
Revert "gitignore:  Ignore generated header test files"

This reverts commit 8267056a6477e3517b974bc1d33d275365c43ec6.

9 years agoconfigure.ac: bump to version 1.7.93 for the RC2 release 1.7.93
Bryce Harrington [Wed, 27 May 2015 02:21:30 +0000 (19:21 -0700)]
configure.ac: bump to version 1.7.93 for the RC2 release

9 years agoreleasing: Add vars for release name and number
Bryce Harrington [Wed, 27 May 2015 02:20:37 +0000 (19:20 -0700)]
releasing:  Add vars for release name and number

9 years agotests: Drop redundant debug output
Bryce Harrington [Sat, 23 May 2015 01:28:27 +0000 (18:28 -0700)]
tests: Drop redundant debug output

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agointernal-screenshot-test: Make distcheck pass
Derek Foreman [Tue, 26 May 2015 15:21:03 +0000 (10:21 -0500)]
internal-screenshot-test: Make distcheck pass

Add the output screenshot to CLEANFILES so it's properly removed on
distclean, and add the reference files and ini to EXTRA_DIST so
distcheck can find them.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agogitignore: Ignore generated header test files
Bryce Harrington [Wed, 27 May 2015 00:14:57 +0000 (17:14 -0700)]
gitignore:  Ignore generated header test files

9 years agodesktop-shell: do not black out with startup "none"
Pekka Paalanen [Tue, 26 May 2015 08:54:52 +0000 (11:54 +0300)]
desktop-shell: do not black out with startup "none"

Do not use a black blanket surface when the startup animation is
specified to be "none". This is the final fix needed to make the
screenshot test deterministic and independent of weston-desktop-shell.

Previously, the black surface would cover all outputs until
weston-desktop-shell signalled ready. Then, depending on the set
animation, either the black surface was immediately removed (none) or a
fade-in started (fade).

Now, when there is no black surface at all for "none", the compositor
will show garbage until weston-desktop-shell gets everything up. This
may be undesireable but works for tests. To have the old "none"
behaviour back, I would propose to add a new startup-animation value
"black" for it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agodesktop-shell: destroy surfaces in an idle handler after fade out
Derek Foreman [Tue, 14 Apr 2015 22:09:06 +0000 (17:09 -0500)]
desktop-shell: destroy surfaces in an idle handler after fade out

It's possible for more than one animation to be taking place on a view at
the same time.  If one of those animations is the shell's fade out for
dying surfaces, its completion handler will trigger the surface destroy
signal, causing other animations on the animation list to remove themselves.

Since this removal occurs during the linked list walk, the compositor may
crash.

We move the actual surface destruction into an idle handler to avoid this.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoexposay: Don't crash if no pointer is present
Derek Foreman [Fri, 22 May 2015 16:47:20 +0000 (11:47 -0500)]
exposay: Don't crash if no pointer is present

If the compositor has never seen a mouse, exposay will crash because
the seat->pointer pointer is NULL.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agotests/internal-screenshot: Fix test so it doesn't expect shell surfaces
Derek Foreman [Mon, 25 May 2015 20:19:38 +0000 (15:19 -0500)]
tests/internal-screenshot: Fix test so it doesn't expect shell surfaces

We no longer have a race with shell startup because we create our own
colored surface and check that it's properly drawn.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: Set up the reference image environment variable
Derek Foreman [Fri, 22 May 2015 19:49:52 +0000 (14:49 -0500)]
tests: Set up the reference image environment variable

make check failed for out of tree builds because we didn't set up
WESTON_TEST_REFERENCE_PATH in weston-tests-env

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoxdg-shell: Document the set_maximized and unsetmaximized requests
Jonas Ådahl [Tue, 5 May 2015 07:35:17 +0000 (15:35 +0800)]
xdg-shell: Document the set_maximized and unsetmaximized requests

This patch changes the semantics (compared to the previous version of
this patch) of maximizing/unmaximizing an already maximized/unmaximized
surface to always result in a configure event. Doing it this way would
be more consistent with how the compositor works regarding other
configure events i.e. send many, letting the client ignore when needed
(for example during resize).

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Document responsibilities regarding ping events
Jonas Ådahl [Tue, 5 May 2015 07:35:16 +0000 (15:35 +0800)]
xdg-shell: Document responsibilities regarding ping events

Document that a compositor is free to ping in any way it wants, but a
client must always respond to any xdg_shell object it created.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
9 years agoxdg-shell: Document error conditions when popup and surface getters
Jonas Ådahl [Tue, 5 May 2015 07:35:15 +0000 (15:35 +0800)]
xdg-shell: Document error conditions when popup and surface getters

Document that a wl_surface can only be assigned either a xdg_popup or
xdg_surface once and that if the client still stries to do that an error
is raised.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Pekka Paalanen <pekka.paalanen@collabora.co.uk>

9 years agoxdg-shell: Clarify the meaning of app ID and give example
Jonas Ådahl [Tue, 5 May 2015 07:35:14 +0000 (15:35 +0800)]
xdg-shell: Clarify the meaning of app ID and give example

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
9 years agogl-renderer: Make the error logging a little nicer
Derek Foreman [Wed, 20 May 2015 19:57:58 +0000 (14:57 -0500)]
gl-renderer: Make the error logging a little nicer

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: cleanup whitespace
Bryce Harrington [Thu, 21 May 2015 22:03:50 +0000 (15:03 -0700)]
tests: cleanup whitespace

9 years agotests: Check that the PNG file's stride matches our internal assumption
Bryce Harrington [Thu, 21 May 2015 18:53:54 +0000 (11:53 -0700)]
tests: Check that the PNG file's stride matches our internal assumption

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Fix code style on path/filename routines
Bryce Harrington [Tue, 19 May 2015 00:47:13 +0000 (17:47 -0700)]
tests: Fix code style on path/filename routines

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add capture_screenshot_of_output()
Bryce Harrington [Thu, 14 May 2015 22:07:55 +0000 (15:07 -0700)]
tests: Add capture_screenshot_of_output()

Provides a convenience function for JFDI grabbing of a single
screenshot.  Tests that are doing multiple screenshots or other
fanciness probably will bypass this routine and do things more manually,
but this'll provide a reference implementation.  And hopefully there'll
be enough simple cases that this actually is useful.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add check_surfaces_geometry()
Bryce Harrington [Thu, 14 May 2015 21:36:18 +0000 (14:36 -0700)]
tests: Add check_surfaces_geometry()

Minor refactoring to simplify initial sanity checks of surfaces.
Conceivably useful for other basic checking.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add load_surface_from_png()
Bryce Harrington [Thu, 14 May 2015 21:18:56 +0000 (14:18 -0700)]
tests: Add load_surface_from_png()

Loads an image from disk via cairo, and copies data into a weston test
surface for internal use.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add create_screenshot_surface()
Bryce Harrington [Thu, 14 May 2015 19:50:00 +0000 (12:50 -0700)]
tests: Add create_screenshot_surface()

Refactor out the screenshot shm buffer creation code.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add write_surface_as_png() helper
Bryce Harrington [Thu, 14 May 2015 19:21:13 +0000 (12:21 -0700)]
tests: Add write_surface_as_png() helper

And use the helper routine for generating the output filename.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add internal test for the weston test screenshot capability
Bryce Harrington [Wed, 5 Nov 2014 00:39:38 +0000 (16:39 -0800)]
tests: Add internal test for the weston test screenshot capability

This also serves as a proof of concept of the screen capture
functionality and as a demo for snapshot-based rendering verification.
Implements screenshot saving clientside in the test itself.

This also demonstrates use of test-specific configuration files, in this
case to disable fadein animations and background images.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Handle screenshot done event in weston-test
Bryce Harrington [Thu, 23 Apr 2015 23:33:49 +0000 (16:33 -0700)]
tests: Handle screenshot done event in weston-test

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add screenshot recording capability to weston-test
Bryce Harrington [Tue, 5 May 2015 22:13:20 +0000 (15:13 -0700)]
tests: Add screenshot recording capability to weston-test

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83981
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agoprotocol: Add test screenshot capability
Bryce Harrington [Tue, 16 Dec 2014 01:03:04 +0000 (17:03 -0800)]
protocol: Add test screenshot capability

This adds a capture_screenshot request which returns an image of the
screen in the client-supplied wl_buffer for the given display output.

A 'done' event is used to indicate when screenshotting has finished and
the wl_buffer is ready to be read.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Support --config to enable tests to override config defaults
Bryce Harrington [Wed, 15 Apr 2015 22:31:11 +0000 (15:31 -0700)]
tests: Support --config to enable tests to override config defaults

Implements a simple mechanism to allow tests to customize the
configuration.  For a given <name>-test.c just place a <name>.ini file
at the same location as the test itself.  Alternately, you can generate
a <name>.ini in the same directory that the compiled test is placed
(i.e. the top builddir).  If no configuration file is found, then no
configuration will be used (i.e. --no-config is specified.)

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add surface checks
Bryce Harrington [Mon, 15 Dec 2014 23:51:25 +0000 (15:51 -0800)]
tests: Add surface checks

Introduce helper routines for testing surfaces against specific
conditions.  These allow tests to validate screen captures as displaying
the correct rendering results.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add an xmalloc helper function
Bryce Harrington [Thu, 23 Apr 2015 01:23:01 +0000 (18:23 -0700)]
tests: Add an xmalloc helper function

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add client helper routines for output and reference filenames
Bryce Harrington [Tue, 9 Dec 2014 22:46:36 +0000 (14:46 -0800)]
tests: Add client helper routines for output and reference filenames

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Add error handling for system calls
Bryce Harrington [Wed, 15 Apr 2015 22:10:31 +0000 (15:10 -0700)]
tests: Add error handling for system calls

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
9 years agocompositor-drm: Clean trailing whitespace
Daniel Stone [Thu, 21 May 2015 07:28:58 +0000 (08:28 +0100)]
compositor-drm: Clean trailing whitespace

Signed-off-by: Daniel Stone <daniels@collabora.com>
9 years agoRDP compositor: enforce certificate and key
David FORT [Tue, 19 May 2015 07:57:37 +0000 (09:57 +0200)]
RDP compositor: enforce certificate and key

The RDP compositor is usable without certificates and key in a very limited
number of cases (local usage using xfreerdp), so let's force the presence of
keys and certificates.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor-wayland: Code cleanup
Dima Ryazanov [Wed, 20 May 2015 08:03:53 +0000 (01:03 -0700)]
compositor-wayland: Code cleanup

Don't do multi-assignments.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor-wayland: Handle window close events more gracefully
Dima Ryazanov [Tue, 19 May 2015 06:14:16 +0000 (23:14 -0700)]
compositor-wayland: Handle window close events more gracefully

When a compositor window is closed, remove the output instead of just exiting.

(The "if (!input->output)" checks are kind of ugly - but I couldn't find
a better way to handle the output going away.)

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoeditor: warn when write fails
Bryce Harrington [Tue, 19 May 2015 22:32:09 +0000 (15:32 -0700)]
editor: warn when write fails

Fixes warning:

 clients/editor.c: In function ‘data_source_send’:
 clients/editor.c:573:7: warning: ignoring return value of ‘write’,
 declared with attribute warn_unused_result [-Wunused-result]
   write(fd, editor->selected_text, strlen(editor->selected_text) + 1);
        ^

9 years agocompositor-drm: minor sp. fix
Bryce Harrington [Tue, 19 May 2015 22:25:18 +0000 (15:25 -0700)]
compositor-drm: minor sp. fix

9 years agoconfigure: Warn that cairo-gl and cairo-glesv2 are risky
Bryce Harrington [Tue, 19 May 2015 20:24:37 +0000 (13:24 -0700)]
configure: Warn that cairo-gl and cairo-glesv2 are risky

Most distros do not ship with gl-enabled cairo, since doing so can
result in libgl being linked to each cairo-using client, even if they
don't actually use GL, and this can cause much larger per-client memory
footprint, and thus can become a resource issue.

Furthermore, while in theory this should work fine, we don't actively
test this configuration, and there could be random undiscovered bugs if
it's used.  We keep the option available for people interested in
helping us chase down those issues, but warn everyone else away.

9 years agocompositor-drm: disable hardware cursors
Pekka Paalanen [Tue, 19 May 2015 06:53:16 +0000 (09:53 +0300)]
compositor-drm: disable hardware cursors

With the recent universal plane and atomic modeset / nuclear pageflip
development in the kernel, cursor content updates on Intel are currently causing
an extra wait for vblank. This drops Weston's framerate to a fraction by
2 when cursor contents update. This combined with the damage tracking
bug in Weston which causes cursor content updates on every frame the
cursor moves makes using hw cursors really bad.

It is possible that the Intel DRM driver will get fixed and cursor
updates there revert to their old behaviour on the contemporary KMS API.
However, it is hardware dependant whether cursor updates can happen
immediately.  Some other hardware, especially ARM-related, may not be
able to do immediate updates. Therefore it is better to just not even
try - we should rely only on the lowest common denominator behaviour
between hardware and drivers as there is no and will not be any way to
reliably detect it.

Note, that while having different drivers do different things (immediate
update vs. update that gets latched on the next vblank), we cannot
rearrange the contemporary KMS API calls such that it would always work
fine. Either some hardware would update the cursor too early, or other
hardware would update the cursor too late and perhaps cause the
framerate decimation.

Mark hardware cursors broken by default. This avoids using them, and
works around the immediate problem of framerate issues in Weston. This
follows the same reasoning why hardware overlay planes have been
disabled by default for a long time.

This disablement will be removed once the current code for hardware
planes and cursors is replaced with code using the atomic KMS API.

The Intel driver change that exposed this problem is
https://github.com/torvalds/linux/commit/38f3ce3af5742eb5a3e9b01997f5ab85109c5762
which is first included in Linux 4.0-rc1.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: nerdopolis <bluescreen_avenger@verizon.net>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-By: David FORT <contact@hardening-consulting.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agocompositor-drm: pass ARGB fallback to gl create functions for XRGB formats
Derek Foreman [Fri, 15 May 2015 17:12:40 +0000 (12:12 -0500)]
compositor-drm: pass ARGB fallback to gl create functions for XRGB formats

If the GL implementation doesn't provide an XRGB visual we may still be
able to proceed with an ARGB one. Since we're not changing the scanout
buffer format, and our current rendering loop always results in saturated
alpha in the frame buffer, it should be Just Fine(tm) - and probably better
than just exiting.

This is a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=89689

Reviewed-By: Bryce Harrington <bryce@osg.samsung.com>
Tested-By: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agogl-renderer: Take a list of acceptable formats in create functions
Derek Foreman [Fri, 15 May 2015 17:12:39 +0000 (12:12 -0500)]
gl-renderer: Take a list of acceptable formats in create functions

Currently we pass either a single format or no formats to the gl renderer
create and output_create functions.  We extend this to any number of
formats so we can allow fallback formats if we don't get our first pick.

Reviewed-By: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agoreleasing: untabify
Bryce Harrington [Sat, 16 May 2015 01:51:19 +0000 (18:51 -0700)]
releasing: untabify

9 years agoreleasing: List some lib paths to set for local libinput
Bryce Harrington [Sat, 16 May 2015 01:50:04 +0000 (18:50 -0700)]
releasing: List some lib paths to set for local libinput

These always bite me, so while probably uncommon may as well document
them...

9 years agoconfigure.ac: bump to version 1.7.92 for the RC1 release 1.7.92
Bryce Harrington [Sat, 16 May 2015 01:03:45 +0000 (18:03 -0700)]
configure.ac: bump to version 1.7.92 for the RC1 release

9 years agoremove trailing whitespaces
Michael Vetter [Fri, 15 May 2015 15:17:47 +0000 (17:17 +0200)]
remove trailing whitespaces

Remove trailing whitespaces because they are not needed and jumping to
the end of al ine should do just that and not jump to the whitespace.

9 years agolauncher-util: Force all weston_launcher_open()s to use O_CLOEXEC
Derek Foreman [Fri, 1 May 2015 16:46:36 +0000 (11:46 -0500)]
launcher-util: Force all weston_launcher_open()s to use O_CLOEXEC

Really, there's pretty much no time we'd ever want O_CLOEXEC unset,
as it will likely result in leaking fds to processes that aren't
interested in them or shouldn't have them.

This also removes the (now unused) code from weston_logind_open() that
could drop O_CLOEXEC.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agologind: actually close fd in weston_launcher_close()
Derek Foreman [Thu, 30 Apr 2015 19:37:03 +0000 (14:37 -0500)]
logind: actually close fd in weston_launcher_close()

You had one job...

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com> [implicit from v1
comment]
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxwm: Fix the window decoration hints.
Dima Ryazanov [Mon, 4 May 2015 02:56:37 +0000 (19:56 -0700)]
xwm: Fix the window decoration hints.

Enable all hints by default. This fixes the "Maximize" button in apps that
don't set any hints - e.g., xclock or Firefox. (There's still a problem, though:
"decorate" is sometimes treated as a boolean, sometimes as a bitmask.)

Handle MWM_DECOR_ALL correctly. It looks like it's supposed to invert the values
of the rest of the flags.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-By: Giulio Camuffo <giuliocamuffo@gmail.com>
9 years agoRDP compositor: fixes for multiple connections, mstsc and FreeRDP master compilation
Hardening [Mon, 11 May 2015 21:19:02 +0000 (22:19 +0100)]
RDP compositor: fixes for multiple connections, mstsc and FreeRDP master compilation

This patch fixes the problem reported on the mailing list
(http://lists.freedesktop.org/archives/wayland-devel/2015-January/019575.html).
All certificate and key paths were not copied when given to FreeRDP, so they
were freed when the peer was disconnecting. And so the next connection was failing.

All the initialization stuffs have been moved to the activate callback, as when it is
called the peer is ready for graphics.

We also differ the creation of the seat, so that a seat is initialized only the
peer really do the activation sequence. That helps when mstsc just connects to see
the certificate, ask if the certificate should be trusted, and then reconnects.

This patch also adds configuration settings for recent versions of FreeRDP that
comes with everything disabled. This makes remoteFx functionnal again.

The patch also handles the skipCompression flag for last FreeRDP versions, that
allows to skip bulk compression for surfaces that have been already compressed by
the remoteFx or NS codec.

This also fixes the compilation against FreeRDP master with callback that now return
BOOL.

Signed-off-by: Hardening <rdp.effort@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoprotocol: Improve formatting of input method and text protocols
Jonas Ådahl [Wed, 17 Sep 2014 20:49:04 +0000 (22:49 +0200)]
protocol: Improve formatting of input method and text protocols

To make it more readable, add an empty line between each request and
event.

Also comes with a bonus indentation fix.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
9 years agoman: use Xwayland instead of Xorg
Giulio Camuffo [Sun, 10 May 2015 08:29:33 +0000 (11:29 +0300)]
man: use Xwayland instead of Xorg

9 years agotext-input: Replace model with input
Derek Foreman [Fri, 8 May 2015 22:08:41 +0000 (17:08 -0500)]
text-input: Replace model with input

commit 78d00e45cc renamed text_model to text_input

This cleans up remaining uses of the word "model"

Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agotext: Fix text-input for multi-seat
Derek Foreman [Fri, 8 May 2015 22:08:40 +0000 (17:08 -0500)]
text: Fix text-input for multi-seat

Multi-seat configurations currently break the text-backend, crashing
weston.  This is an attempt to clean up any crashes and have somewhat
sensible input panel behavior with multi-seat.

Store a link to the manager that created a text_input, use this to
ensure that only a single panel gets popped up at a time, since there
is only one manager.

Replace deactivate_text_input with deactivate_input_method: multiple
input methods may focus the same text_input, so deactivating a text_input
is weird in multi-seat and confusing to perform.

In destroy_input_method_context set the context's input_method's context
pointer to NULL to prevent a dangling pointer.

Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agoxwm: make X windows of type 'utility' inactive
Giulio Camuffo [Wed, 29 Apr 2015 16:00:48 +0000 (19:00 +0300)]
xwm: make X windows of type 'utility' inactive

Skype's popup notifications use this type.

9 years agodesktop-shell: set the current size in the first 'resizing' configure event
Ryo Munakata [Sat, 2 May 2015 12:44:04 +0000 (21:44 +0900)]
desktop-shell: set the current size in the first 'resizing' configure event

Weston has sent the first 'resizing' configure event with width=height=0.
But resizing to that size doesn't make sense.
Instead, we now send the current width and height of the surface at the beginning
of resizing.

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
9 years agocompositor: send the output_created signal after inserting it in the list
Giulio Camuffo [Wed, 6 May 2015 18:41:57 +0000 (21:41 +0300)]
compositor: send the output_created signal after inserting it in the list

The compositor's output_created signal used to be sent in weston_output_init()
which the backend call before putting the output in the output_list.
This caused problems when creating a new view in a listener to that signal,
because weston_view_assign_output() doesn't yet know the new output exists.
To fix this add a new weston_composito_add_output() func which adds the
output in the list and later sends the signal, and make the backends call
that.

9 years agoeditor: implement Cut,Copy,Paste
Manuel Bachmann [Sun, 29 Mar 2015 23:57:44 +0000 (01:57 +0200)]
editor: implement Cut,Copy,Paste

weston-editor is the only stock client spawning the virtual
keyboard ; which means it may be the only client able to
obtain some special characters (depending on the user's
keyboard layout).

If we implement Cut, Copy and Paste, the user has now a way
to copy such characters to other useful clients (such as
weston-terminal). Plus, it demonstrates text data exchange
between two clients of different nature.

Functionality is implemented in a right-click menu and the
Ctrl+Shift+X/C/V bindings, just as in weston-terminal.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoconfigure.ac: bump to version 1.7.91 for the alpha release 1.7.91
Bryce Harrington [Thu, 7 May 2015 02:00:02 +0000 (19:00 -0700)]
configure.ac: bump to version 1.7.91 for the alpha release

9 years agotests: Fix Samsung copyright assignment on xwayland test
Bryce Harrington [Tue, 5 May 2015 18:16:51 +0000 (11:16 -0700)]
tests:  Fix Samsung copyright assignment on xwayland test

9 years agoxdg-shell: Specify fullscreen size-mismatch handling
Jonas Ådahl [Tue, 7 Apr 2015 08:42:27 +0000 (16:42 +0800)]
xdg-shell: Specify fullscreen size-mismatch handling

We cannot rely on the client to provide a surface filling the output so
we must specify what happens with the outputs area that is not covered
completely.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Specify the meaning of 0x0 window geometry in configure
Jonas Ådahl [Tue, 7 Apr 2015 04:07:56 +0000 (12:07 +0800)]
xdg-shell: Specify the meaning of 0x0 window geometry in configure

Some times the compositor needs to send a configure request but without
having any clue about what size the surface should have. Examples
include unmaximizing a surface that was mapped as maximized, or an
initial state which doesn't have any size expectations.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Some xdg_popup clarifications
Jonas Ådahl [Thu, 2 Apr 2015 07:25:53 +0000 (15:25 +0800)]
xdg-shell: Some xdg_popup clarifications

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Some minor clarifications
Jonas Ådahl [Thu, 2 Apr 2015 07:16:14 +0000 (15:16 +0800)]
xdg-shell: Some minor clarifications

Mention set_window_geometry in configure documentation.

Add a strategic "For instance" to clarify what is just an example.

Clarify that the arguments of set_window_geometry are in the surface
local coordinate space.

Point out that the client needs to destroy a dismissed popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Fix a couple of typos
Jonas Ådahl [Thu, 2 Apr 2015 06:47:13 +0000 (14:47 +0800)]
xdg-shell: Fix a couple of typos

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoxdg-shell: Document that xdg_surface.set_window_geometry needs a commit
Jonas Ådahl [Wed, 18 Mar 2015 09:18:20 +0000 (17:18 +0800)]
xdg-shell: Document that xdg_surface.set_window_geometry needs a commit

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Require a buffer and a wl_surface.commit for mapping a window
Jonas Ådahl [Wed, 18 Mar 2015 09:08:23 +0000 (17:08 +0800)]
xdg-shell: Require a buffer and a wl_surface.commit for mapping a window

Require the client to have attached (either previously committed, or
newly) a buffer to the corresponding wl_surface, and that the window
will not be potentially mapped until calling wl_surface.commit after
having created the window. This is required to make valid double
buffered xdg_surface state possible when creating a window.

Currently there is no double buffered state in xdg_popup, but it should
behave the same as xdg_surface, and for making it future proof in case
we want to add double buffered state to xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Move xdg_shell.get_xdg_popup errors to xdg_shell
Jonas Ådahl [Wed, 18 Mar 2015 08:37:47 +0000 (16:37 +0800)]
xdg-shell: Move xdg_shell.get_xdg_popup errors to xdg_shell

They are errors that may be as a result of calling get_xdg_popup on an
xdg_shell, not a result of calling a request on xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Require proper object tree destruction
Jonas Ådahl [Wed, 18 Mar 2015 08:20:51 +0000 (16:20 +0800)]
xdg-shell: Require proper object tree destruction

Require all child objects to be destroyed before the parent. In other
words, all popups and surfaces created by one xdg_shell instance needs
to be destroyed before the xdg_shell object, otherwise a protocol error
is raised.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: fix typo
Derek Foreman [Fri, 1 May 2015 19:30:20 +0000 (14:30 -0500)]
tests: fix typo

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agodata-device: send the selection to all the wl_data_device resources of a client
Giulio Camuffo [Fri, 1 May 2015 09:59:36 +0000 (12:59 +0300)]
data-device: send the selection to all the wl_data_device resources of a client

As we do for the input interfaces such as wl_pointer, we must send the
selection event to all the wl_data_device resources the client created for
a specified seat.

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agodata-device: add a function to send the selection to a client
Giulio Camuffo [Fri, 1 May 2015 09:59:35 +0000 (12:59 +0300)]
data-device: add a function to send the selection to a client

This commit adds a new exported function, weston_seat_send_selection(),
which sends the current selection to a specified client. This is
useful e.g. to implement a clipboard manager as a special client.

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agoclipboard: don't crash if the source client does not send a mime type
Giulio Camuffo [Thu, 30 Apr 2015 21:13:55 +0000 (00:13 +0300)]
clipboard: don't crash if the source client does not send a mime type

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agotouch: Make weston_touch_set_focus() take a touch instead of a seat
Derek Foreman [Thu, 30 Apr 2015 21:45:41 +0000 (16:45 -0500)]
touch: Make weston_touch_set_focus() take a touch instead of a seat

The other set_focus() functions take the relevant type instead of a seat
already, so this is consistent.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agocompositor: change weston_surface::destroy_signal argument
Pekka Paalanen [Fri, 17 Apr 2015 11:23:38 +0000 (14:23 +0300)]
compositor: change weston_surface::destroy_signal argument

Pass 'this' weston_surface as the data argument to
weston_surface::destroy_signal listeners. The old &surface->resource was
really just an offsetted pointer to the weston_surface anyway. And,
because 'resource' happened to be the first member in struct weston_surface,
it was actually 'this' weston_surface.

The argument type was accidentally changed in commit
26ed73cee858956f6af07c3e4bb49b5514f17b8b from wl_resource* to
wl_resource**.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor: inert wl_surface objects do not exist
Pekka Paalanen [Fri, 17 Apr 2015 11:00:24 +0000 (14:00 +0300)]
compositor: inert wl_surface objects do not exist

There is no valid case, where you would actually destroy a
weston_surface, while leaving the wl_surface protocol object in
existence. Therefore, inert wl_surface objects do not exist, except
because of bugs.

To catch such bugs, check that the resource is really NULL before
actually destroying the weston_surface.

We actually used to have this check, but it was removed by:

commit 9dadfb53526bc97d62dc01c165e8b6f722f7ea5a
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 8 13:49:36 2013 -0400

    compositor: Eliminate marshalling warning for leave events

However, the invariant was put back in:

commit 0d379744d34e616fea840272deda6b7027f79f55
Author: Giulio Camuffo <giuliocamuffo@gmail.com>
Date:   Fri Nov 15 22:06:15 2013 +0100

    compositor: set weston_surface:resource to NULL when destroyed

So apparently the issue fixed by 9dadfb53 was fixed another way later.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: set an initial value for ivi-surface.
Nobuhiko Tanibata [Mon, 27 Apr 2015 08:02:54 +0000 (17:02 +0900)]
ivi-shell: set an initial value for ivi-surface.

Especially, the size of destination rectagle is set to (1,1).
This is because the size will be used for caluculating scale and not to
be 0 to avoid 0 dividing.

I also remark this as FIXME. This shall be fixed at ivi-layout-tansition.c.
In new invoded application, its property is initilized by (0,0)
destination rectangle. So transition fucntion always calculates its scale
as inf at first frame of fade-in with new invoked application. To fix this,
restructing transition function is ideally needed.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: remove unnecesary code in ivi_shell_surface_configure
Nobuhiko Tanibata [Mon, 27 Apr 2015 08:02:35 +0000 (17:02 +0900)]
ivi-shell: remove unnecesary code in ivi_shell_surface_configure

This method should not update weston_view directly. This shall be done by
controller via ivi_layout_*.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: fit source rectangle of ivi-surface to the size of application content.
Nobuhiko Tanibata [Mon, 27 Apr 2015 08:00:25 +0000 (17:00 +0900)]
ivi-shell: fit source rectangle of ivi-surface to the size of application content.

When application changes the size of its content, UI shall fit the source
rectangle, view area, to the size of its content to show whole content.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: remove unnecesary assignment of fail safe value.
Nobuhiko Tanibata [Mon, 27 Apr 2015 07:57:26 +0000 (16:57 +0900)]
ivi-shell: remove unnecesary assignment of fail safe value.

Scale is calculated as float and to be inf. It shall be avoided by,
ivi_layout_surface_set_source/destination_rectangle. So output log and
then return this method to use prevous scale for fail safe.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: remove unnecesary code in ivi_layout_surface_configure
Nobuhiko Tanibata [Mon, 27 Apr 2015 07:54:01 +0000 (16:54 +0900)]
ivi-shell: remove unnecesary code in ivi_layout_surface_configure

ivi_layout_surface_configure is called from ivi-shell when configure
listener of weston surface is triggered. This function shall do,
- emit signal to hmi-controller to notify the configuration change

Other unnecesary logics are cleaned up.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: support surface screen shot of ivi_layout by using weston_surface_copy_content
Nobuhiko Tanibata [Mon, 20 Apr 2015 17:13:15 +0000 (02:13 +0900)]
ivi-shell: support surface screen shot of ivi_layout by using weston_surface_copy_content

The reason why the result is not output in the method is that it avoids
to have dependency on CAIRO. If user want to output it to file, user
shall link CAIRO on its controller.

ivi_layout_surface_get_size is also supported here because user needs
stride to call ivi_layout_surafce_dump.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agonotes: Don't manipulate lists while tranversing the list
Bryce Harrington [Tue, 14 Apr 2015 20:43:06 +0000 (13:43 -0700)]
notes: Don't manipulate lists while tranversing the list