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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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);
^