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);
^
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.
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
38f3ce3af5
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>