Commit Graph

3355 Commits

Author SHA1 Message Date
Kristian Høgsberg
b159560da2 tablet-shell: Use new weston_config instead of old config parse 2013-09-21 22:35:13 -07:00
Kristian Høgsberg
8c079ae052 window.c: Port to use weston_config instead of old parser 2013-09-21 22:26:10 -07:00
Kristian Høgsberg
9c3dee18ce terminal: Port to new weston_config parse 2013-09-21 22:23:08 -07:00
Kristian Høgsberg
b12e35617c compositor: Unlink unmapped surface instead of rebuilding surface list
When unmap and destroy a surface we need to make sure we don't pick it
before we rebuild the new surface list.  Currently we ensure this
by rebuilding the surface list when destroying a surface, but just
removing the surface should be enough.
2013-09-21 21:26:05 -07:00
Giulio Camuffo
1cf329bff1 xwm: remove the destroy listener from the old surface signal 2013-09-21 20:58:53 -07:00
Neil Roberts
f428d25779 Add a test client to test multiple pointer/keyboard resources
This adds a hacked version of simple-shm which can create multiple
pointer and keyboard resources. The resources are created with the
command line options -p and -k. Both take an integer argument which
specifies the time in seconds after the program is started when the
resource should be created. It can also take a second time with a
colon separator to specify when the resource should be released.

For example:

 weston-multi-resource -p5 -p7 -k9 -p12:14

That would create a pointer after 5 seconds, a second pointer 2
seconds later, a keyboard 2 seconds after that, a third pointer after
a further 3 seconds and finally after 2 more seconds it would release
that final pointer resource.

This can be used along with WAYLAND_DEBUG to check that it gets the
right events for example if the pointer is created while the client's
surface already has focus and so on.
2013-09-21 20:57:46 -07:00
Neil Roberts
96d790e74b input: Emit events on all resources for a client
The Wayland protocol permits a client to request the pointer, keyboard
and touch multiple times from the seat global. This is very useful in a
component like Clutter-GTK where we are combining two libraries that use
Wayland together.

This change migrates the weston input handling code to emit the
events for all the resources for the client by using the newly added
wl_resource_for_each macro to iterate over the resources that are
associated with the focused surface's client.

We maintain a list of focused resources on the pointer and keyboard
which is updated when the focus changes. However since we can have
resources created after the focus has already been set we must add the
resources to the right list and also update any state.

Additionally when setting the pointer focus it will now send the
keyboard modifiers regardless of whether the focused client has a
pointer resource. This is important because otherwise if the client
gets the pointer later than you getting the keyboard then the
modifiers might not be up-to-date.

Co-author: Neil Roberts <neil@linux.intel.com>
2013-09-21 20:56:55 -07:00
Hardening
57388e44e5 Notify clients on mode_switch()
This patch implements the notification of clients during mode_switch.
As discussed on IRC, clients are notified of mode_switch only when the
"native" mode is changed and activated. That means that if the native
mode is changed and the compositor had activated a temporary mode for
a fullscreen surface, the clients will be notified only when the native
mode is restored.
The scaling factor is treated the same way as modes.
2013-09-21 11:40:21 -07:00
Hardening
ff39efa5c0 Rename current, origin, scale, origin_scale
This patch renames that fields to have consistent names.
2013-09-21 11:40:17 -07:00
Giulio Camuffo
a2df51c19f xwm: set the right cursor when hovering on the decoration borders
use the alternative cursor names used also in window.c, since the
names it used previously are not guaranteed to exist in all themes.
2013-09-21 11:35:37 -07:00
Giulio Camuffo
85739eab12 xwm: set the window's shsurf pointer to NULL on unmap handling
the unmap event will be followed by the deletion of the weston_surface,
so the shell_surface will also be deleted by the shell. Having removed
the surface_destroy_listener, the surface_destroy callback doesn't
get called, so reset the value of shsurf here.
2013-09-21 11:27:19 -07:00
Axel Davy
5e396ae9ae Restoring alpha after the shell effects.
After the fade or zoom effects, alpha could not have been 1.0, preventing
not redrawing behind opaque windows.

This patch add a reset function in weston_surface_animation to reset
some variables the effects affect.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2013-09-21 11:26:46 -07:00
Stefan Schmidt
fda265268d input: Fix trailing whitspaces and indent.
Just some cosmetics to conform to the wayland coding style.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
2013-09-21 11:18:45 -07:00
Kristian Høgsberg
3f4958755d launcher: Move rest of tty object into struct weston_launcher
The struct weston_launcher object will now either handle tty and vt switching
details in-process (when running weston directly as root) or talk to
the weston-launch process.
2013-09-18 23:00:17 -07:00
Kristian Høgsberg
6a7c8492cc weston-launch: Use fstat to make sure we stat the right fd
Instead of the racy stat+open, open first and then use fstat.  We want to
make sure we're stating the fd we'll be sending to weston and nothing else.
2013-09-18 22:14:09 -07:00
Kristian Høgsberg
81b4963949 launcher: Handle tty setup and teardown in launcher 2013-09-18 11:14:14 -07:00
Kristian Høgsberg
1eb482d814 launcher: Handle drm set/drop master and vt switch signals in launcher 2013-09-18 11:14:14 -07:00
Kristian Høgsberg
61741a293c compositor: Generalize VT switching as a session_signal
Instead of a callback from the tty module, we now have a compositor level
signal that fires when our session is activated or deactivated.
2013-09-18 11:14:14 -07:00
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