Commit graph

5051 commits

Author SHA1 Message Date
Chris Michael 6172c38ef4 compositor.h: Remove unused variable from weston_seat structure
This variable may have been used previously when evdev.c was used
however that functionality seems to have been consumed by libinput, so
there is no need for this variable in the weston_seat structure anymore.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-23 23:47:04 -08:00
Chris Michael b50ed17bda clients: Adjust grammar of comment for toysurface->prepare function pointer
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-23 19:28:47 -08:00
Chris Michael 51baeb2840 compositor: Remove extra blank line
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-23 19:28:41 -08:00
Bryce Harrington f69bd1a909 clients: Fix a few minor typos in comments 2015-11-20 11:58:13 -08:00
Derek Foreman bc9a61cc23 compositor: Move weston_matrix_transform_region to compositor.c and export it
We're going to use this to replace much of the other transform code so
it's no longer just relevant to pixman-renderer.c

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
[Pekka: add the warning about matrix restrictions]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Jason Ekstrand 52c476ac8d pixman-renderer: Use output->matrix for region transformations and enable output zoom
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Pekka: added the comment for the function]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Derek Foreman 9774679680 gl-renderer: Make texture_used a bool instead of an int
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Derek Foreman 4c11fe777a gl-renderer: Use a bool for needs_full_upload
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Derek Foreman 060cf11f23 compositor: Change "touched" to bool
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Derek Foreman 118387e541 toytoolkit: Remove window_damage()
It's just a direct call to wl_surface_damage() anyway, and the only
caller no longer exists.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Derek Foreman 0aba785384 smoke: Don't post extra damage
We're going to post damage when the widget redraw happens anyway.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-20 15:27:55 +02:00
Jonas Ådahl 2cbf293b05 input: Keep per client pointer resources in their own structs
Keep all per client wl_pointer resources in a new struct called
'weston_pointer_client'. When focus changes, instead of moving a list
of resources between different lists, just change the focused pointer
client.

The intention with this is to make it easier to add wl_pointer
extensions that share the same focus as the corresponding wl_pointer.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-20 11:52:19 +08:00
Jonas Ådahl 8283c343ec input: Don't send wl_pointer.motion if position didn't change
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-20 11:52:19 +08:00
Jonas Ådahl d2510105a6 input: Make pointer grab motion callbacks take an event struct
Instead of only passing absolute pointer coordinates, effectively
loosing motion event data, pass a struct that can potentially contain
different types of motion events, currently being absolute and relative.

A helper function to get resulting absolute coordinates was added for
when previous callbacks simply used the (x, y) coordinates.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-11-20 11:44:56 +08:00
Pekka Paalanen 870fadced3 protocol: fix DTD warning in weston-desktop-shell
The DTD requires elements in certain order, scanner itself doesn't.
Anyway, fix the warning with a simple reordering to match how all other
protocols are written.

Fixes:
protocol:107: element request: validity error : Element request content
does not follow the DTD, expecting (description? , arg*), got (arg
description )

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 15:58:44 +02:00
Jonas Ådahl 379ee65dc7 releasing.txt: Add step about checking wayland-protocols dependency
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 15:54:57 +02:00
Jonas Ådahl 5b0b770c2d Remove workspaces protocol
It doesn't fill a useful function and is not intended to be continued.
If there is need for workspace manipulation from clients a protocol
based on those future needs need to be properly designed.
workspaces.xml is probably not very relevant since it did the bare
minimum.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 15:11:08 +02:00
Jonas Ådahl cf1efd2ab7 Rename screenshooter protocol to weston_screenshooter
Due to the effort of moving a way from non-prefixed protocols, rename
the weston specific screenshooter protocol to weston_screenshooter.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 15:07:24 +02:00
Jonas Ådahl 6d6fb61a32 desktop-shell: Rename protocol weston_desktop_shell
In the effort of going away from generic names of protocols only
relevant for weston, rename the weston desktop shell
weston_desktop_shell.

This also resets the version to 1, as there will be no prior versions
to weston_desktop_shell.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 14:58:58 +02:00
Jonas Ådahl 2a229338a5 Use xdg_shell protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
2015-11-19 14:49:52 +02:00
Jonas Ådahl 08ab0bcb83 Makefile.am: Make the external xml scanning rule version generic
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 14:09:53 +02:00
Jonas Ådahl b57f472c84 Use input method protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 13:17:59 +02:00
Jonas Ådahl 3bcba347a2 Use text input protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 13:07:10 +02:00
Jonas Ådahl 57e48f023c Use linux-dmabuf protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 12:58:58 +02:00
Jonas Ådahl 496adb3bb3 Use fullscreen-shell.xml from wayland-protocols
Use the fullscreen-shell protocol XML from the wayland-protocols
installation, and remove the one we provide ourself.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 12:50:56 +02:00
Derek Foreman 4bcc54d1a5 compositor-wayland: Change focus to a bool instead of an int
Also rename focus to has_focus to be slightly less confusing.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-16 13:01:43 -08:00
Peter Hutterer 1118952e14 desktop-shell: use weston_pointer_send_axis
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-11-16 12:09:07 +08:00
Ahmet Acar 64d78bba9c shared: work around EGL header idiosyncrasy
When no X11 headers are present eglplatform.h will break unless
certain defines are set prior to its inclusion.

including wayland-egl.h defines WL_EGL_PLATFORM which will stop
the attempted inclusion of the X11 headers.

Maybe this isn't the best solution to the problem, but it's harmless
and gets the job done.

Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=92104

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
(patch by Ahmet Acar, commit log by Derek Foreman)
2015-11-13 10:25:46 -06:00
Chris Michael 4a7ce1f66d compositor-drm: pass NULL to mmap() instead of 0 as the address
mmap() function expects to be passed a void pointer as the address
here. Passing NULL is technically more correct than passing 0.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-11-12 10:21:58 -06:00
Derek Foreman 6d556374b8 compositor-drm: fall back to EGL visual_id 0 if no others work
commit e76f185 stopped using visuals with "native visual id" == 0

This broke some systems, so we now try 0 as a worst case fallback if
everything else has failed.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-07 13:37:36 -08:00
Jonas Ådahl 0336ca0cc5 input: Pass axis events through pointer grab interfaces
Don't only send motions and buttons but also axis events through the
pointer grab interface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-11-02 14:30:16 +08:00
Jonas Ådahl 22faea11c8 desktop-shell: Add surface_keyboard_focus_lost helper
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-11-02 14:10:01 +08:00
Shinya Saito 2071f1fbbf Provide damage region for screen recording on Raspberry Pi
When trying to do sceen recording using the screenshooter, no screen data
was ever processed because the rpi-renderer never set the previous frames
damage area.

Update the rpi-renderer to copy the necessary data.

Signed-off-by: Shinya Saito <ssaito@igel.co.jp>
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-29 13:59:03 -07:00
Ucan, Emre \(ADITG/SW1\) 0c0e51e096 ivi-shell: rename ivi_controller_interface
The name of ivi_controller_interface is changed to ivi_layout_interface
with this patch.

This name is better suited to the interface, because it is implemented
in ivi-layout.c and its methods are linked to ivi_layout* functions.

Furthermore, the controller modules (e.g. hmi-controller) are the users
of this interface and they have their own interfaces,
which are called *_controller_interface,
e.g.: ivi_hmi_controller_interface.

This causes confusion about the software architecture.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
2015-10-29 13:55:16 -07:00
Bryce Harrington 32c3211e38 compositor: Disallow negative geometries in backend output configs
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2015-10-29 13:52:22 -07:00
Jonas Ådahl cd0f1acff4 desktop-shell: Make activate_binding take a view instead of surface
In preparation for further refactoring. This patch also removes a
redundant NULL check. Since we pass views, and views will always have an
associated surface, there is no point of checking if it has.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 17:03:54 -07:00
Giulio Camuffo 43008c7620 main: stub the functions to load the backends with the new config system
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 15:23:40 -07:00
Giulio Camuffo 93daabbc71 compositor: pass the backend config struct to the backends init function
Add new configuration argument to the backend_init() function, which
will replace the current argc, argv, and config arguments.
After each backend is converted individually the unused parameters
will be removed.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 15:23:37 -07:00
Giulio Camuffo e3c0d8af43 compositor: introduce structs to handle backends configuration
This commit introduces the structs weston_backend_config and
weston_backend_output_config, to prepare for the new config
system for the backends.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 15:23:32 -07:00
Jon Cruz ecf819b82e zunitc: made name of test fixture parameter explicit.
Instead of using the implicit name 'data', changed the test
with fixture macro ZUC_TEST_F() to use an additional value
to explicitly set the name to use for test data from the
fixture.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 14:57:09 -07:00
Jon Cruz 2ffb0afecb zunitc: Clarify documentation on return behavior.
* Clarify documentation on ZUC_ASSERT_* behavior in regards to return
   vs. abort()
* Added overview section on return behavior.
* Fixed spelling
* Removed outdated reference to tap function.

Changes since v1:

* Incorporated grammatical feedback.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 13:50:56 -07:00
Derek Foreman 46812b6e71 clients: don't discard motion if we have a grab
We discard motion outside the window on the assumption it's from before
some event that caused the window to shrink. However, if we have a grab
it's likely that this motion is actually from dragging from the inside
of the window out.

This fixes a problem where drag selecting in weston terminal behaves
oddly - it doesn't update the select region while the drag is happening
outside the window.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 12:46:05 -07:00
Derek Foreman 5d13548c7e clients: try harder to discard motion after resize
If we're going to ignore motion below and to the right when coming
out of maximize, we should probably also ignore it above and to
the left.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 12:45:55 -07:00
Derek Foreman fa41eec4f7 weston-launch: Remove unused event source
vt_source is never added to an event loop in this launcher, but
it's potentially removed.

Let's just remove the variable entirely.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 12:34:11 -07:00
Ben Hummon 1ab9ca7e01 clients: Correct drawing glitch in stacking demo
Fix a graphics glitch in the stacking demo in which a transient
window's drop shadow is visibile within the interior of the window.

Signed-off-by: Ben Hummon <benjamin.hummon@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-21 16:57:47 -05:00
Derek Foreman 32838c93a5 compositor/clients: Protect CLOCK_BOOTTIME with ifdefs
CLOCK_BOOTTIME is a relatively new* feature that may not actually be
present everywhere (I'm looking at you wheezy).  Since our use of it
is actually only cosmetic, I've just ifdef'd if.

* No it isn't.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2015-10-21 16:44:14 -05:00
Derek Foreman e292694277 build: Add -lrt for programs that use clock_gettime()
glibc requires this prior to 2.17, and we already do it in a few other
places.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2015-10-21 16:40:08 -05:00
Bryce Harrington 33598ffe8d devices-test: Fix typo 'destroyes' in a comment 2015-10-20 08:35:43 -07:00
Derek Foreman 3a1580fb47 clients: track seat_version per seat, not per display
Apparently it's possible for a compositor to advertise seats with
different versions on the same connection, so this makes us more robust
against that dubious behaviour.

This also tracks the seat version we requested instead of the advertised
maximum.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David FORT <contact@hardening-consulting.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-10-19 14:40:40 -05:00
Giulio Camuffo 49da7aeb25 libinput: remove unused #define
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-19 09:37:44 +08:00