platform/upstream/weston.git
9 years agoivi-shell: add new method to remove a callback to get notification of ivi_surface...
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:31:26 +0000 (15:31 +0900)]
ivi-shell: add new method to remove a callback to get notification of ivi_surface property changes.

To get property changes of ivi_surface, callbacks can be registered.
However there was no API to remove a callback rather than remove all
callbacks by using surface_remove_notification.
surface_remove_notification_by_callback can do it.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: bugfix, add ref_count to ivi_layout_layer
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:31:16 +0000 (15:31 +0900)]
ivi-shell: bugfix, add ref_count to ivi_layout_layer

if a controller calls ivi_layout_layer_create_with_demenstion with a ID
which is already created before, the API returns exist ivi_layer.
However addtionally, it shall count up ref count to destroy ivi_layer
when ref count is 0. The previous code will destroy ivi_layer
immediately even if the other code still refers ivi_layer.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: fix ivi_shell_surface lifetime
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:31:08 +0000 (15:31 +0900)]
ivi-shell: fix ivi_shell_surface lifetime

ivi_shell_surface lifetime shall follow the ivi_surface protocol object
lifetime, and frees the ivi-id by destroying the ivi_layout_surface
from both wl_surface and ivi_surface destruction as the protocol specifies.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: make ivi_layout_surface destruction explicit
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:30:53 +0000 (15:30 +0900)]
ivi-shell: make ivi_layout_surface destruction explicit

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: bugfix, SEVG by adding NULL check in ivi_layout_get_screen_resolution
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:30:32 +0000 (15:30 +0900)]
ivi-shell: bugfix, SEVG by adding NULL check in ivi_layout_get_screen_resolution

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: Fix wrong link of wl_list_for_each() of ivilayer
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:30:19 +0000 (15:30 +0900)]
ivi-shell: Fix wrong link of wl_list_for_each() of ivilayer

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: bugfix, check limitation of ivi_layout_layer opacity
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:30:09 +0000 (15:30 +0900)]
ivi-shell: bugfix, check limitation of ivi_layout_layer opacity

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: bugfix, check limitation of ivi_layout_surface opacity
Nobuhiko Tanibata [Mon, 22 Jun 2015 06:29:20 +0000 (15:29 +0900)]
ivi-shell: bugfix, check limitation of ivi_layout_surface opacity

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agobuild: Use AM_CFLAGS instead of GCC_CFLAGS
Derek Foreman [Thu, 18 Jun 2015 16:43:11 +0000 (11:43 -0500)]
build: Use AM_CFLAGS instead of GCC_CFLAGS

AM_CFLAGS is the default for any target that doesn't specify its
own cflags.  We should use AM_CFLAGS in preference to GCC_CFLAGS
so we can change AM_CFLAGS and get all targets.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
[pekka: fixed patch conflicts]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agodesktop-shell: remove screensaver support
Pekka Paalanen [Tue, 16 Jun 2015 10:56:57 +0000 (13:56 +0300)]
desktop-shell: remove screensaver support

This is a follow-up for the patch that removed weston-screensaver. The
aim is to clean up shell.c a little by removing non-essential
components. Vanilla Weston desktop is only a demo, external projects are
encouraged to create user-friendly desktop environments.

The support for launching a screensaver client and the protocol bindings
are removed. With them, all related configuration options are removed,
and the manuals are updated accordingly.

The screensaver protocol definition is left in desktop-shell.xml for
posterity.

This does not affect Weston's or desktop-shells ability to put screens
to sleep after inactivity. The inactivity timer continues to operate as
before. Also screen locking is unaffected.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
9 years agoRemove weston-screensaver
Pekka Paalanen [Tue, 14 Apr 2015 07:25:33 +0000 (10:25 +0300)]
Remove weston-screensaver

This removes the weston-screensaver client.

Screensavers are not so useful, DPMS is much better. This example has
existed here for a good while, and things that we could learn from it
have been learnt.

Nowadays this is just dead weigth, which is usually not even compiled,
because it depends on both cairo-gl and GLU. Removing it removes the
only possible dependency to GLU and one user of cairo-gl. Now the last
user of cairo-gl is gears (clients/nested.c uses cairo-glesv2).

Support for screensavers is still left in desktop-shell, so external
projects can still have their screensavers if they want.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
9 years agocompositor: add missing help text
JoonCheol Park [Fri, 12 Jun 2015 09:26:02 +0000 (18:26 +0900)]
compositor: add missing help text

The headless-backend.so was missing in available backend list

Signed-off-by: JoonCheol Park <jooncheol@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor: Add missing help text
Derek Foreman [Wed, 10 Jun 2015 21:57:09 +0000 (16:57 -0500)]
compositor: Add missing help text

Help messages were missing for some command line options.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoDo not install the new helpers macro header file.
Jon A. Cruz [Tue, 16 Jun 2015 20:15:14 +0000 (13:15 -0700)]
Do not install the new helpers macro header file.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoAdded new include file to all SOURCES variables with files that use it.
Jon A. Cruz [Tue, 16 Jun 2015 20:15:13 +0000 (13:15 -0700)]
Added new include file to all SOURCES variables with files that use it.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi: Use build dir instead of libexec dir in generated test ini file
Derek Foreman [Tue, 16 Jun 2015 18:30:35 +0000 (13:30 -0500)]
ivi: Use build dir instead of libexec dir in generated test ini file

We don't want to use installed binaries when running tests.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor-x11: More verbose logging
Bryce Harrington [Wed, 27 May 2015 01:14:21 +0000 (18:14 -0700)]
compositor-x11: More verbose logging

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotext: cleanup text backend style
Murray Calavera [Tue, 9 Jun 2015 20:29:28 +0000 (20:29 +0000)]
text: cleanup text backend style

Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agogl-renderer: Don't print GL error for EGLGetDisplay()
Derek Foreman [Thu, 11 Jun 2015 17:14:45 +0000 (12:14 -0500)]
gl-renderer: Don't print GL error for EGLGetDisplay()

EGLGetDisplay() doesn't generate a GL error, so we shouldn't print one.

I've also renamed the goto labels so it's a little clearer when to use them.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoUnified multiple definitions of container_of() macro.
Jon Cruz [Mon, 15 Jun 2015 22:37:10 +0000 (15:37 -0700)]
Unified multiple definitions of container_of() macro.

Removed duplicate definitions of the container_of() macro and
refactored sources to use the single implementation.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoMoved the MIN() macro to the helper include.
Jon Cruz [Mon, 15 Jun 2015 22:37:09 +0000 (15:37 -0700)]
Moved the MIN() macro to the helper include.

Removed multiple definitions of the MIN() macro from existing
locations and unified with a single definition. Updated sources
to use the shared version.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoMoved helper macro to a discrete include file.
Jon Cruz [Mon, 15 Jun 2015 22:37:08 +0000 (15:37 -0700)]
Moved helper macro to a discrete include file.

To help reduce code duplication and also 'kitchen-sink' includes
the ARRAY_LENGTH macro was moved to a stand-alone file and
referenced from the sources consuming it. Other macros will be
added in subsequent passes.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoRemove redundant #include path component.
Jon Cruz [Mon, 15 Jun 2015 22:37:07 +0000 (15:37 -0700)]
Remove redundant #include path component.

Using the parent '../' path component in #include statements makes
the codebase more rigid and is redundant due to proper -I use.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoprotocol/text: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Mon, 15 Jun 2015 22:21:47 +0000 (15:21 -0700)]
protocol/text: Update boilerplate from MIT X11 license to MIT Expat license

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoCOPYING: Specify origin of the library
Bryce Harrington [Sat, 13 Jun 2015 00:22:19 +0000 (17:22 -0700)]
COPYING: Specify origin of the library

9 years agoxwayland: Fix a couple whitespace errors
Bryce Harrington [Fri, 12 Jun 2015 17:17:39 +0000 (10:17 -0700)]
xwayland: Fix a couple whitespace errors

9 years agoxwayland: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Thu, 11 Jun 2015 23:22:34 +0000 (16:22 -0700)]
xwayland: Update boilerplate from MIT X11 license to MIT Expat license

9 years agowcap: Prefer quote form of include for config.h
Bryce Harrington [Thu, 11 Jun 2015 23:06:31 +0000 (16:06 -0700)]
wcap: Prefer quote form of include for config.h

9 years agowcap: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Thu, 11 Jun 2015 23:05:41 +0000 (16:05 -0700)]
wcap: Update boilerplate from MIT X11 license to MIT Expat license

9 years agotests: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Thu, 11 Jun 2015 22:39:40 +0000 (15:39 -0700)]
tests: Update boilerplate from MIT X11 license to MIT Expat license

9 years agovaapi-recorder: Drop redundant license
Bryce Harrington [Fri, 12 Jun 2015 20:53:35 +0000 (13:53 -0700)]
vaapi-recorder: Drop redundant license

This file was provided under both the Expat and X11 variants of the MIT
license.  We don't need the latter, so remove it and leave just Expat.
And reformat the Expat license so it matches our standard boilerplate.

9 years agoweston-egl-ext.h: Reformat license text
Bryce Harrington [Fri, 12 Jun 2015 20:52:15 +0000 (13:52 -0700)]
weston-egl-ext.h: Reformat license text

This file was already covered by the Expat variant of the MIT license.
Just reformat the text to match our standard boilerplate formatting.

9 years agolibbacklight: Add missing boilerplate to header
Bryce Harrington [Fri, 12 Jun 2015 17:15:36 +0000 (10:15 -0700)]
libbacklight: Add missing boilerplate to header

Use identical license and copyright as the .c file.

9 years agosrc: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Thu, 11 Jun 2015 22:35:43 +0000 (15:35 -0700)]
src: Update boilerplate from MIT X11 license to MIT Expat license

9 years agoshared: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Thu, 11 Jun 2015 21:20:17 +0000 (14:20 -0700)]
shared: Update boilerplate from MIT X11 license to MIT Expat license

9 years agoprotocol: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Thu, 11 Jun 2015 20:24:24 +0000 (13:24 -0700)]
protocol: Update boilerplate from MIT X11 license to MIT Expat license

9 years agoprotocol: whitespace cleanup
Bryce Harrington [Thu, 11 Jun 2015 20:24:08 +0000 (13:24 -0700)]
protocol: whitespace cleanup

9 years ago*-shell: Update boilerplate from MIT X11 license to MIT Expat licenses
Bryce Harrington [Thu, 11 Jun 2015 19:55:55 +0000 (12:55 -0700)]
*-shell: Update boilerplate from MIT X11 license to MIT Expat licenses

9 years agoclients: Update boilerplate from MIT X11 license to MIT Expat licenses
Bryce Harrington [Thu, 11 Jun 2015 05:48:59 +0000 (22:48 -0700)]
clients: Update boilerplate from MIT X11 license to MIT Expat licenses

9 years agodata: Update boilerplate from MIT X11 license to MIT Expat license
Bryce Harrington [Wed, 10 Jun 2015 21:48:07 +0000 (14:48 -0700)]
data: Update boilerplate from MIT X11 license to MIT Expat license

9 years agoCOPYING: Drop special license callout for libbacklight.c
Bryce Harrington [Wed, 10 Jun 2015 21:13:01 +0000 (14:13 -0700)]
COPYING: Drop special license callout for libbacklight.c

Weston's license is now identical to libbacklight.c, so just merge the
copyright statements.

9 years agoCOPYING: Update to MIT Expat License rather than MIT X License
Bryce Harrington [Wed, 10 Jun 2015 21:11:26 +0000 (14:11 -0700)]
COPYING: Update to MIT Expat License rather than MIT X License

MIT has released software under several slightly different licenses,
including the old 'X11 License' or 'MIT License'.  Some code under this
license was in fact included in X.org's Xserver in the past.  However,
X.org now prefers the MIT Expat License as the standard (which,
confusingly, is also referred to as the 'MIT License').  See
http://cgit.freedesktop.org/xorg/xserver/tree/COPYING

When Wayland started, it was Kristian Høgsberg's intent to license it
compatibly with X.org.  "I wanted Wayland to be usable (license-wise)
whereever X was usable."  But, the text of the older X11 License was
taken for Wweston, rather than X11's current standard.  This patch
corrects this by swapping in the intended text.

In practical terms, the most notable change is the dropping of the
no-advertising clause.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agocompositor: remove the authenticate vfunc
Giulio Camuffo [Thu, 11 Jun 2015 16:10:51 +0000 (19:10 +0300)]
compositor: remove the authenticate vfunc

It was introduced in 5fcd0aa58e243caf24f4deb080ac76e83d52213f and
then used in code that doesn't exist anymore.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agodon't attempt to start input method if path is empty
Murray Calavera [Tue, 9 Jun 2015 20:28:06 +0000 (20:28 +0000)]
don't attempt to start input method if path is empty

This allows a user to explicitly disable the input
method by setting path to blank;

Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agomove text_backend initialization into the shell plugin
Murray Calavera [Wed, 10 Jun 2015 21:16:02 +0000 (21:16 +0000)]
move text_backend initialization into the shell plugin

Whether a input method is used should be the responsibility
of the shell because some shells may not want to implement
an input method at all

Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotext: handle existing seats on init
Murray Calavera [Wed, 10 Jun 2015 21:15:30 +0000 (21:15 +0000)]
text: handle existing seats on init

a following patch will be moving text init call into shell
modules, which will be called much later than in current code

Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoWhitespace corrections
Murray Calavera [Sat, 6 Jun 2015 13:02:22 +0000 (13:02 +0000)]
Whitespace corrections

Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
9 years agointernal-screenshot-test: Fix endian problem
Derek Foreman [Tue, 26 May 2015 17:00:49 +0000 (12:00 -0500)]
internal-screenshot-test: Fix endian problem

Use bit-shifts to properly generate pixel data.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoscreenshooter: clean up recorder_binding a little
Derek Foreman [Wed, 3 Jun 2015 20:53:29 +0000 (15:53 -0500)]
screenshooter: clean up recorder_binding a little

We already have a pointer to the compositor so change seat->compositor to ec

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoinput: clean up update_keymap a little
Derek Foreman [Wed, 3 Jun 2015 20:53:27 +0000 (15:53 -0500)]
input: clean up update_keymap a little

We already have a pointer to the keyboard, so we can change all
seat->keyboard to keyboard.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoinput: minor clean up in weston_seat_repick()
Derek Foreman [Wed, 3 Jun 2015 20:53:23 +0000 (15:53 -0500)]
input: minor clean up in weston_seat_repick()

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoinput: clean up notify_modifiers a little
Derek Foreman [Wed, 3 Jun 2015 20:53:26 +0000 (15:53 -0500)]
input: clean up notify_modifiers a little

We already have a pointer to the keyboard, so we can change all
seat->keyboard to keyboard.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoinput: clean up seat_get_keyboard a little
Derek Foreman [Wed, 3 Jun 2015 20:53:28 +0000 (15:53 -0500)]
input: clean up seat_get_keyboard a little

We already have a pointer to the keyboard, so we can change all
seat->keyboard to keyboard

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoconfigure.ac: bump version to 1.8.90
Bryce Harrington [Wed, 3 Jun 2015 07:11:24 +0000 (00:11 -0700)]
configure.ac: bump version to 1.8.90

Master is open for new features again

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
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.