Commit Graph

3337 Commits

Author SHA1 Message Date
Kristian Høgsberg 05ad1e4e8a launcher: Collect launcher state in new struct weston_launcher
We're going to add a bit more launcher state, so start out by creating
a new struct weston_launcher we can track it in.
2013-09-18 11:14:14 -07:00
Kristian Høgsberg bf3c374b1b weston-launch: Use SOCK_SEQPACKET for the launcher socket
This lets us detect hang-up when weston-launch dies and clean up properly.
2013-09-18 11:14:14 -07:00
Kristian Høgsberg f45b1e8284 weston-launch: Pass the right CLOEXEC flag to fcntl
Passing O_CLOEXEC to fcntl is wrong, we need to pass FD_CLOEXEC.
2013-09-18 11:14:14 -07:00
Kristian Høgsberg 1ff5109b5f compositor: Open drm device through launcher 2013-09-17 14:05:47 -07:00
Sam Spilsbury b42fb52537 Added tests for the vertex clipping code.
This tests (via the table-driven testing method) that the correct
number of vertices and also the correct vertices themselves
are generated for an clip box and polygon of up to eight vertices.

Also add a libshared-test.la so that we don't have to build weston-test-runner
all the time
2013-09-16 21:40:34 -07:00
Sam Spilsbury 619859ce90 Split vertex clipping code out into vertex-clipping.c 2013-09-16 21:40:31 -07:00
José Bollo 4a4704a7d0 Minor improvement of weston-terminal resizing 2013-09-13 15:42:28 -07:00
Sam Spilsbury b502126e19 Add support for table-driven testing.
The new TEST_P macro takes a function name and a "data" argument to
point to an arbitrary array of known size of test data. This allows
multiple tests to be run with different datasets. The array is stored
as a void * but advanced by a known size on each iteration.

The data for each invocation of the test is provided as a "data" argument,
it is the responsibility of the test to cast it to something sensible.

Also fixed single-test running to only run the tests specified
2013-09-13 15:19:35 -07:00
Sam Spilsbury db0eda4abb Remove AM_LDFLAGS usage
We are not building everything here as a module, only the test modules.
2013-09-13 15:13:49 -07:00
Peter Hutterer f97a68079b clients: remove superfluous call 2013-09-13 15:12:23 -07:00
Peter Hutterer e2a9eff77b clients: de-duplicate demo clients list 2013-09-13 15:12:14 -07:00
Giulio Camuffo 62942ad3a6 xwm: set the shell_surface's title
add a new function pointer to the weston_shell_interface struct that
shells will set accordingly.
2013-09-11 13:50:54 -07:00
Giulio Camuffo ca43f0942e xwm: place transient windows at the right position 2013-09-11 13:50:03 -07:00
Peter Hutterer 9715d4db54 tests: list available tests if an invalid test name is given 2013-09-11 13:41:22 -07:00
Peter Hutterer 534f0a4dd1 tests: support -h/--help for the tests
Including listing the tests available in that binary
2013-09-11 13:41:12 -07:00
Peter Hutterer d8ca89017c tests: include config.h in weston-test-runner 2013-09-11 13:40:34 -07:00
Peter Hutterer 44f719109d tests: use variable for test name in weston-tests-env
Slightly more readable and makes it easier to switch to use $2 for something
in the future (if that's ever needed).
2013-09-11 13:40:01 -07:00
Peter Hutterer 498d5f07cb tests: always build tests
check_PROGRAMS and friends are only built during make check. Which is a
great way of introducing compiler errors in tests. Always build them, TESTS
defines what's being run during make check.
2013-09-11 13:38:03 -07:00
Kristian Høgsberg 2e3c396ae3 shell: Use wl_resource_for_each() for sending out workspace status 2013-09-11 12:00:47 -07:00
Rob Bradford 6e737f590b input: Use new wl_resource_for_each for sending updated seat caps 2013-09-11 11:57:28 -07:00
Ander Conselvan de Oliveira a62ef3e0b6 vaapi-recorder: Don't leak drm fd
Make vaapi_recorder take onwership of the fd and close it at destroy
time.
2013-09-11 11:55:32 -07:00
Ander Conselvan de Oliveira b85ded0cb8 vaapi-recorder: Encode frames in a separate thread
Previously, vaapi_recorder_frame() would wait until the encoded
contents for a frame is written to the output file descriptor. This
delayed the repainting of the next frame, and affected frame rate
when capturing with high resolutions. Instead, wait only if there is
and attempted to encode two frames at the same time.

Increases framerate from 30 to 60 fps when capturing at 1920x1200 on
my SandryBridge system, although there are periodic slowdowns due to
disk writes.
2013-09-11 11:55:15 -07:00
Adrian Negreanu 4aa756dc7a add libhybris support
it uses the Android fbdev HAL[1] (through libhybris[2])
and the libhybris implementation of wayland-egl.

Configure flags:
 cairo:
   --enable-glesv2=yes  --enable-egl=yes
 weston:
   --with-cairo-glesv2 --enable-fbdev-compositor
 hybris:
   --enable-wayland --enable-arch=x86
   --with-android-headers=<android-headers> --enable-alinker=jb

The android headers are extracted from an AOSP tree,
using hybris/utils/extract-headers.sh

[1]:
https://github.com/android/platform_hardware_libhardware/blob/master/include/hardware/fb.h

[2]: https://github.com/libhybris/libhybris

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
2013-09-11 11:54:11 -07:00
Kristian Høgsberg 8a20500847 terminal: Stop complaining about OSC escape code 7
This is the current working directory of the shell as an URI.  We
don't use that for anythign at the moment, but let's not complain
about it at least.
2013-09-11 11:52:56 -07:00
Andrew Wedgbury a94dc8a51b compositor-x11: Copying xkb_info when creating a seat causes problems
Sorry, I missed updating use of xkb_info in compositor-x11.c.
I've updated the patch.
2013-09-11 11:20:35 -07:00
Marc Chalain ffbddff89a fbdev: Support of TrueColor and Directcolor of video hardware
backend check the type of the framebuffer and accept DirectColor and TrueColor
I use a "switch case" to implement other cases in the future.
2013-09-11 11:20:26 -07:00
Stanislav Vorobiov bfbb8e59fa gl_renderer: Use EGL_WAYLAND_Y_INVERTED_WL to query wl_buffer's orientation 2013-09-11 10:56:00 -07:00
Andrew Wedgbury 9a6f02a6b1 Copying xkb_info when creating a seat causes problems
Hi Kristian,

Here's a new patch for ref counting weston_xkb_info, as suggested.
So a seat created with a NULL keymap will now point to the global xkb_info.
2013-09-11 10:06:23 -07:00
Kristian Høgsberg 1702d4cfca input: Initialize data source to NULL
This way we do the right thing, when we get a NULL wl_resource for self-dnd.
2013-09-11 09:45:03 -07:00
Kristian Høgsberg 0abad07750 compositor: Return 0 on success
Add missing return statement.
2013-09-11 09:42:26 -07:00
Kristian Høgsberg 735bda25da dnd: Support dropping as text/plain;charset=utf-8 2013-09-09 15:03:27 -07:00
Kristian Høgsberg 73bdc0ce85 xwm: Fix fd leak in weston_wm_send_data()
The call to source->send(source, mime_type, p[1]); dups the fd, and we have
to close p[1] to not leak it.
2013-09-04 22:32:50 -07:00
Kristian Høgsberg 3f7fcf83f6 xwm: Try a non-blocking write before setting up an fd watch for property data
Typically we can write it immediately without blocking, so save the overhead
of setting up an fd watch and writing the data in a callback.  For the
case where the immediate write doesn't write all data, we fallback and
set up the fd watch as usual.

This patch also consolidates setting up the async write a bit.
2013-09-04 22:12:28 -07:00
Kristian Høgsberg f9cb3b17d5 xwm: Add support for bridging Xdnd to wayaland DnD 2013-09-04 21:24:41 -07:00
Kristian Høgsberg 9466e50626 xwm: Only handle selection notify events for CLIPBOARD in selection code 2013-09-04 21:09:24 -07:00
Kristian Høgsberg 668fc0de0b xwm: Fix fd leak in selection code
The file descriptors we receive in the wayland protocol callbacks are
already O_CLOEXEC, so don't dup them to set O_CLOEXEC.`
2013-09-04 20:52:20 -07:00
Kristian Høgsberg 85de9c25fe compositor: Split dnd setup up into weston_seat_start_drag()
This makes the drag-and-drop code available to in-weston data sources,
similar to how we can set a selection data source internally.  The
wl_data_device.start_drag entry point now calls this function after
validating protocol arguments.
2013-09-04 20:46:56 -07:00
Kristian Høgsberg 0749e3f470 terminal: Accept utf-8 text drop 2013-09-04 20:41:06 -07:00
Kristian Høgsberg 938f102a97 dnd: Only accept dnd with the application/x-wayland-dnd-flower mime-type
Currently, the dnd sample client accepts all mime-types and assumes they
are the custom flower mime-type.  Only accept if the offer has the right
mime-type.
2013-09-04 19:36:49 -07:00
Kristian Høgsberg edb6a3bd0a configure.ac: Only enable enable_simple_egl_clients if enable_egl is yes
This simplifies a few checks and makes sure we only build the
subsurfaces client if EGL is enabled.

https://bugs.freedesktop.org/show_bug.cgi?id=68727
2013-09-03 22:59:17 -07:00
Brian J Lovin a8e627f4f2 keyboard: Add rudimentary touch support to keyboard.
At this time there is no way to have a key be activated when
touch_up is called, so all this patch does is activate they
key on touch_down.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2013-09-03 22:49:16 -07:00
Kristian Høgsberg 1f7ce6e3d5 configure.ac: Only build libva recorder if we found libva
The automatic detection failed to disable the build if it didn't
find libva.

https://bugs.freedesktop.org/show_bug.cgi?id=68908
2013-09-03 22:46:02 -07:00
Kristian Høgsberg 6399646a6b compositor-drm: Pass the wl_resource to gbm_bo_import()
Another silent regression from the wl_resource opaquify effort.  This was
causing our pageflip-to-client-buffer and sprites optimizations to
not kick in.
2013-09-03 22:32:52 -07:00
Kristian Høgsberg ab6d6674b6 xwm: Unmap frame window when client window is unmapped
We used to destroy the frame window and reparent the client window to
wm_window.  That means that we lose the destroy_notify event when the
client window is destroyed later, since we don't select for
substructure_notify on wm_window.

Instead of destroying and reparenting, just unmap the frame window.
2013-09-03 20:57:18 -07:00
Kristian Høgsberg 318ea37782 xwm: Split creation of frame window out into its own function 2013-09-03 20:57:18 -07:00
Kristian Høgsberg 81cadc725c xwm: Set window->surface to NULL when surface goes away
Otherwise we may end up trying to remove the destroy listener if we
get the surface_destroy callback before the unmap_notify.
2013-09-03 20:57:18 -07:00
Kristian Høgsberg 1a7a57f0d9 xwm: Detect WM_NORMAL_HINTS fullscreen attempts 2013-09-03 20:57:11 -07:00
Kristian Høgsberg 59f44c184d xwm: Detect legacy fullscreen modes 2013-09-03 20:56:20 -07:00
Kristian Høgsberg 1b6fed41dd xwm: Update size when override redirect windows change size 2013-09-03 20:56:12 -07:00
Kristian Høgsberg c940dcdb38 configure: Require wayland-server 1.2.90
Make sure we look for a recent enough version of wayland-server for
the new wl_seat release requests.
2013-08-30 15:00:01 -07:00