If you do an out-of-tree build, all the images will be left in the
srcdir. Fix their paths.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
The ivi-shell / hmi-controller cannot run without a properly populated
config file. Generate a config file especially for tests, which includes
paths to the build dirs.
The generated file will be used by following patches adding ivi-shell
tests.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Also use variable default assignment to eliminate an if clause
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The log files were being named like:
surface-global-test.la-log.txt
surface-global-test.la-serverlog.txt
surface-test.la-log.txt
surface-test.la-serverlog.txt
text.weston-log.txt
text.weston-serverlog.txt
For consistency, omit the test filename's extension (.la/.so).
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
basename returns the filename without path information (but with
the file extension). We can get this more efficiently via shell
variables.
Also, for the socket name, use the test's name without the file
extension.
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
[Pekka: rebased without "tests: Support --config to enable tests to
override config defaults".]
Weston running the Wayland backend is nested. The parent compositor uses
an unknown clock for the frame callback timestamps. This is quite likely
a different clock from what the nested Weston chose as its presentation
clock.
This means we cannot reasonably read the presentation clock and assume
it has any relation to the timestamp got from the frame callback. In
fact, this was seen to cause absurd repaint delays, trigger the insanity
check, reduce fraterate, etc. problems, because we assume we can read
the clock and compute the remaining repaint delay.
As we can't use the timestamp, ignore it, and read our own presentation
clock instead.
The X11 backend does not suffer from this, because there the parent
window system never provides us any timestamps, so we always read our
own clock.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Now that we've removed the XYToWindow handler in Xwayland, we actually
have to stack windows properly. This stacks windows on top when
activating them.
Note that for a fully robust Xwayland implementation, we'll need a
complete stack tracker implementation, unfortunately.
Reviewed-by: Daniel Stone <daniels@collabora.com>
When loading a controller module, if we do not find a
controller_module_init symbol, return failure to the caller instead of
ignoring the failure.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
This will be useful for tests, where we use --no-config, but ivi-shell
needs load the controller module from somewhere.
We are not making hmi-controller.so the default, because this patch
should allow running the tests also with another controller.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
A more descriptive name to not be confused with create_client().
v2: Rebased: fix also devices-test.c.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Introduce a new helper create_client(), which creates and initializes
the client struct, but does not create a wl_surface.
This will be useful for ivi-shell tests.
v2: Rebased, and restored the dependency to weston-test.so, since seat
handling requires it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Test misc races when adding/releasing devices
v2.: use one roundtrip after releasing devices
add touch support
v3.: remove useless checks
add few comments
repeat tests 30 times instead of 100 times
(it took too long, 30 is enough)
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Let the client bind to wl_touch. Since we have our own seat,
we know that the compositor will have wl_touch capability.
v2: rebased due to changes in previous commit
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
When running on different backends, we don't know what devices
the backend provides. Create new seat for tests that contains
everything what we need. This is also first step in adding
touch support for tests.
v2: do not add devices in wl_seat.name event. Collect first
all wl_seats and then pick the one that we need and
destroy the rest. The effect is the same, but this code
is better understandable.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
We used hard-coded version 1 for all globals. For testing
newer methods and events we need use the current version
of global. This patch fixes this and adds missing
event handlers (for the events that were added in
versions > 1)
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This request simulates device creation/destruction from evdev (libinput)
v2: added support for touch. Touch is not supported yet,
but better be prepared
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
All the surfaces from all the X clients share the same wl_client so
wl_client_get_credentials can't be used to get the pid of the X
clients.
The shell may need to know the pid to be able to associate a surface
with e.g. a DBus service.
[Pekka: fixed trivial merge conflicts.]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.
Allow toytoolkit to create EGL surfaces with them, by
falling back to the old creation method.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Should be "client" instead of "nclient".
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The dummy typedefs for "get_platform_display()" and
"create_platform_window()" were badly defined, which
prevented building Weston on older systems.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Terminal is a nice app that support fullscreening. To be able to test
minimizing of a fullscreen app, add an entry to the context menu. That
is the only way to minimize, as window frame is not there when
fullscreen.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The "set_minimized(surface, 0)" function call was never
used anywhere, and not really respecting naming
conventions.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add a command line option to specify a file to be read instead of
weston.ini.
IVI-shell testing will at least temporarily need to specify a config
file, because it cannot run without. That is why this is being added,
but should be convenient for everybody, too.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
We have the Weston command line option '--no-config' which is meant to
prevent loading weston.ini at all. It works for Weston itself, but it
does not work for any clients that also want to read weston.ini.
To fix that, introduce a new environment variable WESTON_CONFIG_FILE.
Weston will set it to the absolute path of the config file it loads.
Clients will load the config file pointed to by WESTON_CONFIG_FILE. If
the environment variable is set but empty, no config file will be
loaded. If the variable is unset, things fall back to the default
"weston.ini".
Note, that Weston will only set WESTON_CONFIG_FILE, it never reads it.
The ability to specify a custom config file to load will be another patch.
All programs that loaded "weston.ini" are modified to honour
WESTON_CONFIG_FILE.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Move the config file loading code from main() to its own function.
No functional changes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
open() will happily open directories and other non-normal files.
Attempting to parse them as config files makes no sense, so check that
the opened file is indeed a regular file.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Make a little short-hand for the module directory.
This also cleans up the redefinition of BACKEND in the script.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Move the code that checks for unhandled command line options only after
all the module loading. We pass argc, argv to all module loaders, so
modules might want to have command line options, but you cannot use them
if the check is too early.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
We've already computer the inverse of the output matrix, so we
don't need to calculate it again here.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Right now zoom only works on the output at 0, 0 because it's adding
the output corner co-ordinates to global co-ordinates that already
include the output offset.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
weston_output_transform_coordinate() was supposed to convert from device
co-ordinates to global co-ordinates.
Commit 0f67941c broke that by converting from global to device instead,
which just magically works ok for single untransformed outputs (where the
transformation is identity)
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
We were correctly handling decorated and fullscreen clients, but left
uninitialized values in the input region for undecorated clients. Fix
this behavi-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Currently we unmap and re-map the cursor when the hotspot changes which
causes spurious enter/leave events.
This changes the pointer_set_cursor() logic to avoid this.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This means compositors don't need to call supports() manually and
create() will just return -1 in the failure case as before. This also
means we can deal with the case of eglGetProcAddress returning
non-NULL but not actually being available at runtime.
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tablet shell is long gone. Might as well list what we have now.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>