Commit Graph

2555 Commits

Author SHA1 Message Date
Kristian Høgsberg 2566ebda4c Add missing builddir includes for version.h
af4f2aaf19 broke this
2013-02-22 12:18:32 -05:00
Kristian Høgsberg d0239b8994 weston.ini: Use 'modeline' key for modeline example
When specifying a modeline, use the modeline key.  Make the example
weston.ini do that.
2013-02-22 12:18:32 -05:00
Kristian Høgsberg 8ac65932a2 src/Makefile.am: Use $(libdir) instead of @libdir@
This allows overriding prefix and libdir at make time.  Noticed
by David Herrmann.
2013-02-22 12:18:32 -05:00
Kristian Høgsberg d27af2a515 Install header files and pkg-config file for external modules
This patch installs the three header files that define the compositor
plugin interface as well as a pkg-config file.  This allows
building weston plugins outside the weston tree.  We currently don't make
any guarantees about the plugin API/ABI except that within a stable
branch we won't break it.

Conflicts:
	configure.ac
	src/compositor.h
2013-02-22 12:18:27 -05:00
Kristian Høgsberg 9a576c3172 compositor-drm: Remember to drop master in drm error handling
Otherwise we'll kill whatever other display sever we're switching back to.
The tricky thing here is that we never explicitly set drm master in the
startup path, we get that implicitly from being the first to open the
drm device.  Even so, we need to drop it before switching VTs.
2013-02-18 20:01:08 -05:00
Marcin Slusarz 25846678a5 compositor: Use libunwind if available for better backtraces
libunwind has a dwarf parser and automatically queries the dlinfo
for location of dlopened modules.  The resulting backtrace is much
better and includes stack frames in dynamically loaded modules.

krh: Originally submitted for Xorg, adapted for weston:

  http://lists.x.org/archives/xorg-devel/2013-February/035493.html

Note this require libunwind at least 1.1 to get the pkg-config files.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>

Conflicts:
	configure.ac
2013-02-18 20:00:42 -05:00
Kristian Høgsberg 5c936adb8d xwm: Don't leak pending.input region
It's not really a leak, since the region is always a rectangle, but let's
play by the rules.

Conflicts:
	src/xwayland/window-manager.c
2013-02-18 19:38:22 -05:00
Giulio Camuffo 5efb413cbc shell: Do not hang when mapping a popup twice
When calling shell_map_popup() more than one time on the same shell_surface
the parent transform was getting added more than one time to the transform
list, resulting in an infinite loop when going through the list with
wl_list_for_each in weston_surface_update_transform_enable().
This commit removes the old transform before adding it again.
2013-02-18 17:39:40 -05:00
Rafal Mielniczuk 1d298b2320 compositor: set data_device keyboard focus in seat_get_keyboard
Because seat_get_keyboard is called after initial
weston_surface_activate, wl_data_device_set_keyboard_focus
fails to send data offer for newly connected client due to
wl_seat.focus_resource being NULL.

This patch calls wl_data_device_set_keyboard_focus
in seat_get_keyboard, so it can send data offer for
newly created client (when wl_keyboard.resource_list
and wl_seat.focus_resource are properly set up).

https://bugs.freedesktop.org/show_bug.cgi?id=60617
2013-02-18 17:39:40 -05:00
Kristian Høgsberg 230641a092 xkb: Don't call exit on failure in weston_compositor_xkb_init()
This will exit without cleaning vt modes and leave the system stuck.

https://bugs.freedesktop.org/show_bug.cgi?id=60817
2013-02-18 17:39:40 -05:00
Ander Conselvan de Oliveira 91fb4a9f8e shell: Set the DPMS state if the screensaver fails to launch or dies
The lock hook in desktop-shell only changes the DPMS state the second
time it is called, because during the first time it launches the
screensaver and wakes the compositor again when the screensaver surface
is configured. However, if the screensaver fails to launch, the output
is left in an enabled state, even thought there's no content being
displayed on the screen.

Fix this by disabling the outputs when the screensaver dies if the
shell is still locked.

https://bugs.freedesktop.org/show_bug.cgi?id=60084
2013-02-18 17:39:40 -05:00
Kristian Høgsberg 04287fd69a xwm: Fix silly region math
We were setting up the opaque region to be the window size and then
intersecting with the opaque rectange that's always contained in the window
rectangle.  Just initialize to the opaque rectangle.
2013-02-18 17:39:25 -05:00
Kristian Høgsberg a57d133ca4 xwm: Fix input region regression from commit changes
This must be the last regression from the surface commit changes.  We
need to set the pending.input region, otherwise the region will be
overwritten on commit.

https://bugs.freedesktop.org/show_bug.cgi?id=60610
2013-02-18 17:38:58 -05:00
Jan Arne Petersen 8ee86c88bc shell: Fix bug when input panel is shown twice
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-18 17:32:55 -05:00
Kristian Høgsberg 0831b750d5 shell: Add back ability to rotate unresponsive surfaces
When a surface in deemed unresponsive and we trigger the busy cursor, it's
no longer possible to rotate the surface.  This is clearly unacceptable.
This patch adds handling of right clicks to the busy grab so that we can
continue to rotate a surface even if the client is sleeping.

https://bugs.freedesktop.org/show_bug.cgi?id=60609
2013-02-18 17:32:49 -05:00
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