Commit graph

5014 commits

Author SHA1 Message Date
Derek Foreman 29b846eaa6 simple-damage: Offset drawing co-ordinates not buffer start
We've been setting up the viewport by moving the start pointer of the
draw buffer, but later when we want to post damage in buffer co-ordinates
we'll need to keep track of the x,y offsets anyway.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-30 10:03:09 -06:00
Derek Foreman 1909c10825 compositor, input: Don't use MIN() macro for new resource versions
libwayland-server protects us from invalid serial numbers by
posting an error already.

MIN() is for clients when selecting interface versions.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-27 17:01:14 -06:00
Pekka Paalanen 7eaed40b37 compositor-drm: fix hw cursor positioning
Fix a regression introduced by be428b3825
which accidentally removed the global-to-output space conversion.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Derek Foreman <derekf@osg.samsung.com>
Cc: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Derek Foreman <derekf@osg.samsung.com>
2015-11-27 09:38:09 -06:00
Nobuhiko Tanibata 747c3865ab ivi-shell: remove a code which expects only a screen in the system.
It breaks from wl_list_for_each of screens when the frist screen found.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-27 15:03:29 +02:00
Nobuhiko Tanibata fbfa8f21f9 ivi-shell: fix layout_layer.view_list is not initilized per a screen.
This is potential bug when it supports several screens. If view_list is
initilized here, the views, which are set by the previous screen, are
cleared. So View list shall be initilized in front of wl_list_for_each
of all screens.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-27 15:03:29 +02:00
Nobuhiko Tanibata 77b0ee18a2 ivi-shell: avoid inserting a ivi_layer to multiple screens.
In just previous wl_list_for_each_safe, list of layer in a screen is
cleaned up. And then, the list is re-constructed from
pending.layer_list.

In this re-construction, if order.link of a layer were inserted into a
screen whose number is later one of current screen, the order.link will
inserted into layer_list of two screens. This shall be avoided.

However, if we want to implement a feature to allow a layer to be added
to multiple screens. A layer shall have several order.link per screens.
So, I marked here as TODO.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-27 15:03:29 +02:00
Nobuhiko Tanibata 3e710d19fe ivi-shell: fix TODO which expects only one screen in the system.
It just return the first screen found in screen list.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-27 15:03:29 +02:00
Ucan, Emre (ADITG/SW1) 7d967da8c2 configure: don't control egl version
The required version only corresponds to version of mesa implementation.
This mesa version requirement causes configure errors,
when weston is configured for a different egl implementation than mesa.
Because the version of the egl drivers are not alligned
to the mesa version.

Therefore, I deleted the version controlling for egl,
so that weston can be configured for a different egl implementation.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-27 12:28:37 +02:00
Chris Michael 062edf2b4c compositor: Fix comment of subsurface_commit_to_cache function
commit 57388e44e5 accidentally changed the comment in
compositor.c::subsurface_commit_to_cache

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-11-26 14:24:16 -06:00
Derek Foreman 57e92ed768 compositor: ignore useless surface_damage
If we pass negative height or width on to pixman we get error messages
in the log.

Also, if width or height is 0, there's no damage, so we can early return
for that too.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-26 09:32:43 -06:00
Jonas Ådahl 35da52debe configure.ac: Bump wayland-protocols dependency to 1.0
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2015-11-25 16:03:04 +08:00
Derek Foreman be428b3825 compositor-drm: Use view transform in cursor plane setup
Make sure a view's transform is viable for a cursor plane and
then actually apply it before setting the cursor plane location.

Now if a subsurface ends up in the cursor plane, the plane will be
properly positioned.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-11-24 12:03:38 -06:00
Yong-iL Joh cd9bb710e7 ivi-shell-user-interface: fix runtime error caused by missing header inclusion
when weston is running on qemux86 device, there is an error with following.

[08:02:07.897] launching '/usr/lib/weston/weston-ivi-shell-user-interface'
[08:02:08.201] /usr/lib/weston/weston-ivi-shell-user-interface died on signal 11

this is caused by type mismatch, and
it does occur on qemux86-64

Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-24 00:31:28 -08:00
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