Commit graph

2518 commits

Author SHA1 Message Date
Pekka Paalanen
7fa807a61b tests: remove test logs on 'make clean'
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-14 16:13:31 -05:00
Kristian Høgsberg
f540c5d2cd text-test: Remove left-over WAYLAND_DEBUG setenv call 2012-12-14 14:41:02 -05:00
Kristian Høgsberg
7e62f2bcd4 clients: Add screenshooter-client-protocol.h to screenshooter sources 2012-12-14 10:54:58 -05:00
Pekka Paalanen
8998d2ee04 update git ignores
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12 11:06:55 -05:00
Pekka Paalanen
7fd5484f4e tests: check wl_display_roundtrip() for errors
Add a macro that wraps wl_display_roundtrip() and check for errors. It
is a macro, so that the assert would show the relevant file and line
number.

This will also catch protocol errors, that would go unnoticed otherwise.

All roundtrips in tests are replaced with the check.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12 11:06:24 -05:00
Pekka Paalanen
874982ab01 tests: set client log handler
Otherwise we cannot normally see protocol errors etc. in the test
output.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12 11:06:23 -05:00
Pekka Paalanen
8883818591 tests: write logs to files
This cleans up the 'make check' output considerably. When all goes well,
you will only see the "PASS" line for each of $TESTS.

Weston logs into a separate file than stdout and stderr, so server logs
end up in one file per test, and other output to another file per test.

'make distclean' does not remove the tests/logs/ directory.

Also changes the weston-tests-env interpreter to bash, since I think &>
and ${1/.la/.so} might be bashisms.
2012-12-12 11:06:12 -05:00
Kristian Høgsberg
0f60a33000 tests: Convert remaining module tests to not use test-runner.c
The remaining module tests don't need to fork and talk to a test client,
so just convert them to regular modules and let them handle running their
tests themselves.  Then drop test-runner.[ch].
2012-12-12 00:02:46 -05:00
Kristian Høgsberg
1a3263721d tests: Remove client-test test
This test case is the last user of the test-client code and it only
tests launching the test-client.  In other words it's a minimal test
of the framework we're dropping, so just drop this test.
2012-12-12 00:02:46 -05:00
Kristian Høgsberg
f636bda1de tests: Port text-test to new test framework
So much simpler this way and the test suite is now back too 100% pass.
2012-12-12 00:02:45 -05:00
Kristian Høgsberg
80004f2d9f tests: Drop yield() helper function
Remaining use case was when we move the pointer.  This doesn't change
geometry so we can just use a wl_display_roundtrip() to make sure
we get the request to the server and receive the resulting events.
2012-12-11 23:57:44 -05:00
Kristian Høgsberg
d001ebc77b keyboard-test: Use wl_display_roundtrip() instead of yield()
As for button-test, a wl_display_roundtrip is sufficient here.  The
yield() between wl_test_activate_surface() and wl_test_send_key() is
also not needed, since the two requests will arrive at the server in
order, and will activate the surface first, then send a key event.
2012-12-11 23:57:44 -05:00
Kristian Høgsberg
a1ada26c2b button-test: Use wl_display_roundtrip instead of yield()
A round trip is sufficient here.  We need to make sure that the server
has received the wl_test request and that we've received the event
that the request triggers.  The wl_display_roundtrip() helper does
exactly that: it sends a wl_display.sync request, which will hit the
server after the wl_test requests and thus the wl_callback.done event
will come back after the server has seen all the previous requests and
after we've handled all preceeding event.
2012-12-11 23:57:44 -05:00
Kristian Høgsberg
cd7f09975a weston-test-client-helper: Use a frame callback to flush surface geometry
When moving a test surface, use a frame callback to make sure the
surface has been moved and the geometry updated.  The compositor may
delay updating the transform matrices, but once we get the frame
callback we know the surface has been repainted and the geometry
updated.
2012-12-11 23:57:44 -05:00
U. Artie Eoff
1f188db7e7 tests: Convert button-test to new test extension
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56821

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 23:57:44 -05:00
U. Artie Eoff
c8352cdc4b tests: Convert event-test to new test extension
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56819

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 23:57:43 -05:00
U. Artie Eoff
35867270f7 tests: Convert keyboard-test to new test extension
This adds a weston-test-runner for the weston test extension and
some weston test client helper methods.

Converted keyboard-test to use the new test interface, runner,
and helper methods.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56822

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 23:57:43 -05:00
U. Artie Eoff
2163565dbe tests: Allow weston-tests-env to process different test types
The weston-tests-env script needs to be able to handle weston
test extension style tests as well as module style tests.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 23:57:43 -05:00
U. Artie Eoff
7ecfe868c7 tests: Rename weston-test to weston-tests-env
Renamed weston-test test environment script to weston-tests-env
to avoid ambiguity with weston-test.c (the weston test extension).

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 23:57:43 -05:00
U. Artie Eoff
3eddfc9d84 tests: Define and implement a test protocol extension.
The weston test extension, called weston-test.so, can be loaded
from the "modules" configuration option on the command line
or in the .ini file.

Clients can bind to the "wl_test" interface to interact with
the weston test extension.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 23:57:43 -05:00
Rob Bradford
ba84e7e166 shell: Remove confusing case fall-through
This avoids calling weston_surface_set_position twice on the same surface. The
second call has no effect in many cases because sx and sy
are usually zero on this path.

This change now means that any sx/sy values passed into ::attach will be
ignored on the first attach for popup surfaces. This similar to the behaviour
for other surface types.
2012-12-11 23:48:01 -05:00
Rob Bradford
0b7b898289 weston-launch: Add some error reporting for weston-launch
This also avoids us passing (size_t)(-1 * sizeof(gid_t)) into malloc
2012-12-11 23:47:47 -05:00
Rob Bradford
6b8e17af60 compositor: Cleanup if we can't find the symbol in the module 2012-12-11 23:47:30 -05:00
Rob Bradford
7d6af71c08 backlight: Revamp error handling code to not leak the directory
To neatly free the directory pointer allocated by opendir(), adjust the error
handling paths to go through to the err label.
2012-12-11 23:47:26 -05:00
Rob Bradford
b28d8edb65 tty: Clean up completely if switching vt fails
The code under the "err" label closes the file descriptor and frees the
allocated memory.
2012-12-11 23:47:23 -05:00
Rob Bradford
8104ec5dd5 xwayland: Close fd opened for lockfile on error path 2012-12-11 23:47:20 -05:00
Rob Bradford
b27094f1b2 backlight: Remove unnecessary and confusing NULL checks
At this point path must point to an allocated string since otherwise the
asprintf that makes the allocation would have failed and we would have
returned earlier.
2012-12-11 23:47:17 -05:00
Rob Bradford
f14a241f35 compositor: Avoid sending event for invalid point
Avoid sending a touch down event using uninitialised surface x/y co-ordinates.
Instead present a log message about this unexpected case.
2012-12-11 23:47:12 -05:00
Rob Bradford
15b3caf2ea screenshooter: Report an error if we fail to open the file 2012-12-11 23:46:58 -05:00
Pekka Paalanen
ce6d79e665 compositor: do not release if re-attaching buffer
If a client called wl_surface.attach with the same wl_buffer as
previously, the compositor would mistakenly send a release on that
buffer. This will cause problems only when clients start to properly use
the wl_buffer.release event.

Do not send wl_buffer.release if the same buffer is attached again.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-11 23:44:58 -05:00
Jan Arne Petersen
246b965128 shell: Do not remove input panel layer when locked
Do not remove the input panel layer from the layer list when the
shell is locked in hide_input_panels().

https://bugs.freedesktop.org/show_bug.cgi?id=56543

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-12-11 23:42:24 -05:00
Kristian Høgsberg
da04086ab2 configure.ac: Bump version to 1.0.2 2012-11-30 16:18:36 -05:00
Ander Conselvan de Oliveira
93594b7651 compositor-drm: Allow scanning out of opaque ARGB surfaces 2012-11-30 15:04:29 -05:00
Pekka Paalanen
6e09a298b7 Fix build warnings from image_loader
Fix the following build warnings, and the build failures due to the
warning fixes:

  CC     libshared_cairo_la-image-loader.lo
image-loader.c:369:1: warning: no previous prototype for 'load_image'

  CC     x11_backend_la-compositor-x11.lo
compositor-x11.c: In function 'x11_output_set_icon':
compositor-x11.c:396:2: warning: implicit declaration of function 'load_image'
compositor-x11.c:396:8: warning: assignment makes pointer from integer without a cast

  CC     wayland_backend_la-compositor-wayland.lo
compositor-wayland.c: In function 'create_border':
compositor-wayland.c:97:2: warning: implicit declaration of function 'load_image'
compositor-wayland.c:97:8: warning: assignment makes pointer from integer without a cast

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>

Conflicts:
	src/compositor-wayland.c
2012-11-30 15:03:47 -05:00
Dima Ryazanov
aeb10f8522 Fix a crash when opening two terminal windows and closing the first one.
To reproduce, launch the terminal, open a second window using Ctrl-Shift-N,
go back to the first window, and press Ctrl-D. The terminal's master FD gets
events even after being closed, causing terminal_destroy to be called twice
on the same object.

To fix this, I'm adding a function to stop watching an FD.
2012-11-30 15:01:14 -05:00
Kristian Høgsberg
b4dc3f0bc4 compositor-x11: Link to libshared-cairo for icon loading helper
The X11 backend needs the image loader helper to load the window
icon.
2012-11-30 15:01:14 -05:00
Kristian Høgsberg
a12cd7d773 configure.ac: Don't link weston to cairo or image libraries
We were pulling in cairo and the image loading libraries through libshared.
Split out libshared into a core libshared and a libshared-cairo that
pulls in the extra libraries.
2012-11-30 14:59:39 -05:00
Scott Moreau
29d1dd6bcd weston.ini: Introduce core section and remove type keys.
Since a6813d288, there is no longer a "type" key in the [shell] config section.
Instead the code accepts a [core] section with a modules key, containing a
comma separated list of modules to load. This patch removes the type keys
and adds a core section in the example weston.ini config file.
2012-11-27 20:31:08 -05:00
Ander Conselvan de Oliveira
11f971c18e compositor: Move clearing of primary plane damage to the backends
Backends may move surfaces to different planes, in which case damage is
generated in the primary plane. This damage is usually passed to the
renderer, but in some cases the backend may decide to not render
anything (that's the case when drm compositor scans out a client
buffer). In that case the damage on the primary plane would be
discarded, leading to artifacts later.

This patch makes the backend's responsibility to clear the damage on
the primary plane, so that unrendered damage is kept for as long as
necessary.
2012-11-27 17:36:38 -05:00
Pekka Paalanen
91a2284140 man: fill missing pieces to weston page
Config file, WAYLAND_SOCKET, XDG_CONFIG_HOME, segfault handler.

NOTE: This is a candidate for the stable branch
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-11-27 17:28:16 -05:00
Pekka Paalanen
79c2a6f48a man: add weston-drm page
Add some documentation about the DRM backend into its own man page, and
refer to it in weston(1).

Environment variable, that are reserved for backends, and currently used
only by the DRM backend, are moved to weston-drm page.

NOTE: This is a candidate for the stable branch
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-11-27 17:28:14 -05:00
Scott Moreau
0e59077c0d xwm: Fix xwm opaque region
Since surface.commit was introduced, opqaue regions are stored in a pending
variable that isn't used until surface.commit. Xwayland uses the surface opaque
region as a way to tell weston what region of the surface should be opaque.
However when this pending opaque region was introduced, xwm was not updated
and so we have the 'black = transparent' problem again. This patch fixes the
problem by having xwm use the pending opaque regions.
2012-11-27 17:27:58 -05:00
Kristian Høgsberg
6a5d6124f0 configure.ac: Bump version to 1.0.1 2012-11-19 22:13:51 -05:00
Scott Moreau
d1446cb351 simple-egl: Reset opaque region if not fullscreen.
If simple-egl is toggled fullscreen, the opqaue region is set for the surface
but never removed after exiting fullscreen. This patch resets the opaque region
to 0 if the surface is not fullscreen and -o was not passed. This fixes the
problem introduced sometime since d7f282b84e, when this was last fixed.
2012-11-19 22:01:11 -05:00
Ander Conselvan de Oliveira
e3d5e3029e simple-egl: Set the right size for the opaque region when fullscreen
window.window_size holds the size of the window in windowed mode. Use
window.geometry for setting the opaque region since that holds the
current size.
2012-11-16 19:25:47 -05:00
Ville Syrjälä
3a7f0689c5 shell/zoom: Increment/decrement disable_planes only when zoom.active changes
disable_planes should only be incremented when zoom.active actually
toggles. Otherwise the counter will be incremented too many times,
and planes will no longer get used.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2012-11-16 19:25:42 -05:00
Ville Syrjälä
151c436650 compositor-drm: Don't use overlay when surface alpha != 1.0f
Assume that overlays can't handle alpha blending even with a constant
alpha factor.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2012-11-16 19:25:40 -05:00
Kristian Høgsberg
ab38eeed19 wcap: Transform damage rectangles according to output tranform
https://bugs.freedesktop.org/show_bug.cgi?id=56697
2012-11-16 19:25:35 -05:00
Kristian Høgsberg
0d0228d355 tests: Remove last GLfloat use
With the EGL/GLES2 types out of compositor.h this now fails to compile.

https://bugs.freedesktop.org/show_bug.cgi?id=57129
2012-11-16 19:25:32 -05:00
Dima Ryazanov
2d1dffb23f Fix a typo. 2012-11-13 21:26:10 -05:00