Commit graph

2540 commits

Author SHA1 Message Date
Kristian Høgsberg
9ceb471a15 configure.ac: Bump version to 1.0.5 2013-02-14 16:50:21 -05:00
Kristian Høgsberg
5f68322dd2 window.c: Don't allow moving a maximized window
Ideally the shell would send an unmaximize event to the client when
we try to move a maximized window, but for now, let's just prevent
moving maximized windows.

https://bugs.freedesktop.org/show_bug.cgi?id=56296
2013-02-14 16:33:10 -05:00
Rob Bradford
fd5654baae shell: Bypass fullscreen scaling if surface width and height match output
If our surface has width and height set to the same dimensions as the output
then we can bypassing the scale factor calculation and addition of the
transformation.

The use case that led to this optimisation is the playback of video using
gstreamer-vaapi with the "scale" method. The video is the same dimensions as
the output (1080p.)
2013-02-14 16:06:02 -05:00
Martin Andersson
9fc4c3c98b weston-launcher: Add missing newline in error message 2013-02-14 16:05:52 -05:00
Kristian Høgsberg
13f65f167b configure.ac: Add version to bug URL as well 2013-02-14 16:04:14 -05:00
Scott Moreau
435a8f0fc9 configure.ac: Change bugs.freedesktop.org product to Wayland
Update the bug link. Thanks to Rune K. Svendsen for spotting this.

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

Conflicts:
	configure.ac
2013-02-14 16:03:29 -05:00
Ander Conselvan de Oliveira
48a9160426 compositor: Init fade surface color properly
When fading in, if a repaint was triggered after a call to
weston_compositor_fade() but before the first call to fade_frame(),
the fade surface wouldn't be drawn because its alpha channel wasn't
initialized properly.
2013-02-14 16:02:09 -05:00
Kristian Høgsberg
c4831be22d screenshot: Print warning if we're not launched from weston
weston-screenshooter is a helper binary that weston launches to write the
screenshot to disk.  If somebody tries to launch it by hand, print a
warning and mention the screenshot keybinding.
2013-02-14 16:01:41 -05:00
U. Artie Eoff
033b5df52f tests: fix assignment typo, should be comparison
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-02-14 16:00:19 -05:00
Scott Moreau
8877173f0c Add --version option 2013-02-14 16:00:02 -05:00
Kristian Høgsberg
b65a207388 weston-launch: Clear environment and set it up from scratch
With recent systemd[1] XDG_VTNR will leak through to pam, which ends up
setting a vtnr pam argument with the wrong value.  The fix is to clear
XDG_VTNR first, but what we should have been doing all along is resetting
the environment.

Thanks to Ray Strode for helping debug this.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=a8573ccc35a4efe8900be5d48c6c803670540c2b
2013-02-14 15:59:49 -05:00
Kristian Høgsberg
cdfc4c2d45 toytoolkit: Remove left-over pixman dependency
toytoolkit doesn't use pixman.  Remove the pixman.h include and the
LDADD.

https://bugs.freedesktop.org/show_bug.cgi?id=57812
2013-02-14 15:59:25 -05:00
Kristian Høgsberg
cc7ad84078 Add new shared/image-loader.h to separate include dependencies
Before, cairo-util.h would combine pixman and cairo includes.  X11 and
Wayland compositors uses this to load an image as a pixman_image_t but are
forced to include cairo headers.  Clients use load_cairo_surface to
load images as cairo_surface_t's, but are forced to include pixman.h.

We move the load_image pixman prototype to its own header, so compositors
can get at the pixman prototype without including cairo.h and clients
can include the cairo based function without including pixman.h.

Conflicts:
	src/compositor-wayland.c
2013-02-14 15:58:40 -05:00
Kristian Høgsberg
b4ca478afd clients: Make libtoytoolkit a libtool library
This way libtool will remember the libtoytoolkit LIBADD libraries.
We can drop the toolkit_libs hack and just link to libtoytoolkit.la and
libtool will add the dependencies.

Conflicts:
	clients/Makefile.am
2013-02-14 15:56:47 -05:00
Dima Ryazanov
cf7c5109a5 terminal: Handle the window close event
There may be multiple windows open, so destroy the terminal instead of exiting.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
2013-02-14 15:54:37 -05:00
Kristian Høgsberg
e4cd90e6bd configure.ac: Bump version to 1.0.4 2013-01-24 20:32:43 -05:00
Scott Moreau
6828711c4c weston-launch: Use "weston-launch" for --help instead of "weston".
The output of weston-launch --help was "Usage: weston [args...] ...".
This changes it to read "Usage: weston-launch [args...] ...".
2013-01-24 20:23:04 -05:00
Pekka Paalanen
a533a85820 tests: make signal other than ABRT a hard failure
We handle FAIL_TEST tests by simply inverting the success flag. The
problem with this is, that if a FAIL_TEST fails by a SIGSEGV, it will be
interpreted as passed. However, no code should ever cause a SEGV, or any
other signal than ABRT. And even ABRT only in the case of an assert()
that is meant to fail. We would probably need more sophistication for the
FAIL_TEST cases.

For now, just interpret any other signal than ABRT as a hard failure,
regardless whether it is a TEST or FAIL_TEST. At least segfaults do not
cause false passes anymore.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 20:22:54 -05:00
Martin Minarik
f03435717c Weston: weston.ini.man page
changes:
 - launcher path, passing environment variables and parameter
 - indent modeline example
2013-01-24 20:22:41 -05:00
Ning Tang
a0c8799a45 compositor-drm: Remove drm_disable_unused_sprites()
If a sprite is no longer used, it is disabled on the call to
drmModeSetPlane() when doing the output repaint, since its
pending_fb_id is 0.

This patch is a backport patch on weston 1.0.
Originally from Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
commit 3b2bd44d92

Some platform has a heavy CPU load caused by redundant drmModeRmFB,
which is called in drm_disable_unused_sprites and would trigger drm_err.

Signed-off-by: Ning Tang <ning.tang@intel.com>
2013-01-10 16:53:29 -05:00
Kristian Høgsberg
b61f7d2773 configure.ac: Bump version to 1.0.3 2012-12-14 16:32:34 -05:00
Kristian Høgsberg
e83fd0680d tests: Pass --backend so the test suite runs with the right modules
Without this we try to load the installed backends, which is nasty for
regular runs, and just doesn't work for make distcheck, which sets
prefix to $PWD/_inst.  This makes sure we load the right backend
and make distcheck pass.  Other modules (xwayland, shells etc) just don't
get loaded for distcheck and for make check we still try to load the
installed modules.
2012-12-14 16:19:43 -05:00
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