platform/upstream/weston.git
8 years agodesktop-shell: make panel clock configurable
Armin Krezović [Thu, 10 Mar 2016 17:02:34 +0000 (18:02 +0100)]
desktop-shell: make panel clock configurable

This patch enhances the panel clock by adding a config file
option which can be used to either disable the clock or make
it also show seconds in the current clock format.

v2: Implement suggestions from Pekka:
    - Include Signed-off-by
    - Coding style fixes
    - Implement clock widget allocation by using
      width from cairo_text_extents
    - Highlight config option values in man page
v3: Implement suggestions from Pekka and Bryce:
    - Use CLOCK_FORMAT_* instead of FORMAT_* in the enum
    - Switch to using fixed clock widget size instead
      of one returned from cairo_text_extents
    - Fixes to config option highlighting in the man page
v4: Implement more suggestions from Pekka and Bryce:
    - Improve patch changelog
    - Move the check for CLOCK_FORMAT_NONE into the
      caller function
    - Fix a memory leak in panel_create introduced by
      previous revision of this patch

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57583
Signed-off-by: Armin Krezović <armin.krezovic@fet.ba>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoclients: Use zalloc
Bryce Harrington [Fri, 12 Feb 2016 00:42:49 +0000 (16:42 -0800)]
clients: Use zalloc

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoplatform: explicitly cast the return value of weston_platform_get_egl_proc_address
Matthias Treydte [Fri, 29 Jan 2016 16:02:15 +0000 (17:02 +0100)]
platform: explicitly cast the return value of weston_platform_get_egl_proc_address

This allows the header to be consumed by C++ compilers, because C++ does
away with C's implicit cast from (void*).
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agooption-parser: Handle short double-arg options
Bryce Harrington [Thu, 11 Feb 2016 23:25:56 +0000 (15:25 -0800)]
option-parser: Handle short double-arg options

weston allows both short and long style options to take arguments.  In
the case of short options, allow an optional space between the option
name and value.  E.g., previously you could launch weston this way:

  weston -i2 -cmyconfig.ini

now you can also launch it like this:

  weston -i 2 -c myconfig.ini

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoconfigure: Make jpeglib an optional dependency.
Emmanuel Gil Peyrot [Tue, 16 Feb 2016 01:57:52 +0000 (01:57 +0000)]
configure: Make jpeglib an optional dependency.

It doesn’t make sense to fail the entire build when jpeglib isn’t
present, so this commit makes it optional just like libwebp in the
previous one, disabled with --without-jpeg and forced with --with-jpeg.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoprotocol: migrate to stable presentation-time.xml
Pekka Paalanen [Thu, 18 Feb 2016 14:53:27 +0000 (16:53 +0200)]
protocol: migrate to stable presentation-time.xml

Remove the unstable presentation_timing.xml file, and use
presentation-time.xml from wayland-protocols instead to generate all the
Presentation extension bindings.

The following renames are done according to the XML changes:
- generated header includes
- enum constants and macros prefixed with WP_
- interface symbol names prefixed with wp_
- protocol API calls prefixed with wp_

Clients use wp_presentation_interface.name rather than hardcoding the
global interface name: presentation-shm, weston-info, presentation-test.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: updated wayland-protocols dependency to 1.2]

8 years agoivi-shell: remove ivi_layout_layer_set_dimension API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:52 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_set_dimension API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_set_dimension API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:50 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_set_dimension API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_layer_set_position API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:46 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_set_position API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_set_position API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:43 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_set_position API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_layer_get_orientation API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:39 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_get_orientation API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_get_orientation API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:35 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_get_orientation API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_layer_get_dimension API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:32 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_get_dimension API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_get_dimension API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:28 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_get_dimension API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_layer_get_position API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:24 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_get_position API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_get_position API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:20 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_get_position API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_layer_get_opacity API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:16 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_get_opacity API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_get_opacity API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:12 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_get_opacity API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_layer_get_visibility API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:07 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_layer_get_visibility API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoivi-shell: remove ivi_layout_surface_get_visibility API
Ucan, Emre \(ADITG/SW1\) [Fri, 4 Mar 2016 12:50:06 +0000 (12:50 +0000)]
ivi-shell: remove ivi_layout_surface_get_visibility API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agohmi-controller: fix leak of ivi surface list
Wataru Natsume [Thu, 3 Mar 2016 10:56:52 +0000 (19:56 +0900)]
hmi-controller: fix leak of ivi surface list

get_surfaces_on_layer() allocates memory and stores the pointer to
'ivisurfs'. But it was not freed.

Signed-off-by: Wataru Natsume <WATARU_NATSUME@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoremove warning of ivisurface reassign on the ivilayer
Wataru Natsume [Thu, 3 Mar 2016 10:56:09 +0000 (19:56 +0900)]
remove warning of ivisurface reassign on the ivilayer

The warning of ivisurface reassign can be removed. It is ok to reassign
a surface to a layer it is already on.

The warning started to show up during normal operations since patch
"hmi-controller: remove duplicate commit_changes in random mode".

Signed-off-by: Wataru Natsume <WATARU_NATSUME@xddp.denso.co.jp>
[Pekka: rewrote commit message, removed unneeded comments.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agohmi-controller: remove duplicate commit_changes in random mode
Wataru Natsume [Wed, 17 Feb 2016 23:48:40 +0000 (08:48 +0900)]
hmi-controller: remove duplicate commit_changes in random mode

Previous code cleaned up surfaces in layer once and then added
surfaces to a layer in random. In this flow, two commitchanges are
required.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
[WATARU_NATSUME@xddp.denso.co.jp: Removes unnecessary check]
Signed-off-by: Wataru Natsume <WATARU_NATSUME@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agolibinput-device: Remove unnecessary function call
Chris Michael [Mon, 22 Feb 2016 13:47:24 +0000 (08:47 -0500)]
libinput-device: Remove unnecessary function call

When we handle keyboard key events, we already retrieve the key state
at the top of this function, so there is no real need to call the same
libinput function again as we can just reuse the 'key_state' variable
that we have above.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agotests: cleanup test runner script.
Jon A. Cruz [Mon, 21 Dec 2015 21:38:51 +0000 (13:38 -0800)]
tests: cleanup test runner script.

Cleaned up test runner script to unify sections launching weston.
This makes the sections more legible and differences easier to spot.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoMakefile: handle also stable wayland-protocols
Pekka Paalanen [Thu, 18 Feb 2016 14:56:13 +0000 (16:56 +0200)]
Makefile: handle also stable wayland-protocols

Fix the protostability function to handle stable protocol files
correctly. Stable protocol XML file names do not have 'stable' in their
name, nor do we want to write that in the prerequisite lists in the
Makefile.

Function 'protoname' does not need fixing, because for stable protocol
prerequisites, the sed pattern will not match, and it passes stem
through as is, which is correct.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoMakefile: move presentation_timing source out of toytoolkit
Pekka Paalanen [Thu, 18 Feb 2016 13:21:58 +0000 (15:21 +0200)]
Makefile: move presentation_timing source out of toytoolkit

Toytoolkit sources don't actually use the presentation_timing client
protocol bindings for anything. Apparently they were there only because
that's how they end up in BUILT_SOURCES.

Move them from toytoolkit sources to BUILT_SOURCES where also other such
things are.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoconfig-parser: Check malloc and strdup returns
Bryce Harrington [Thu, 18 Feb 2016 04:46:01 +0000 (20:46 -0800)]
config-parser: Check malloc and strdup returns

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
8 years agoconfigure: Make WebP support togglable, and improve its error message.
Emmanuel Gil Peyrot [Tue, 16 Feb 2016 01:57:51 +0000 (01:57 +0000)]
configure: Make WebP support togglable, and improve its error message.

The current way was enabling WebP support whenever libwebp was found,
giving no way to the user to disable it if they had the library
installed but didn’t want to link against it.  This adds a
--without-webp configure option to never link against it, and a
--with-webp one to fail the build if it isn’t found, the default being
to use it if it is present.

Additionally, we now tell the user when WebP support has been disabled
and they try to load a WebP file.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agolibinput-device: Remove unnecessary function call
Christopher Michael [Fri, 19 Feb 2016 16:07:00 +0000 (11:07 -0500)]
libinput-device: Remove unnecessary function call

When we handle pointer button events, we already retrieve the button
state at the top of this function, so there is no real need to call
the same function again as we can just reuse the 'button_state'
variable that we have above.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agobuild: Require dbus for systemd-login
Manuel Bachmann [Wed, 4 Nov 2015 11:13:08 +0000 (12:13 +0100)]
build: Require dbus for systemd-login

systemd-login support requires dbus (see "dbus.h" header in
"launcher-logind.c") but the configure script was only
checking libsystemd-login availability to define the
HAVE_SYSTEMD_LOGIN macro, which results in undefined
symbols in launcher-unit.

Put the systemd-login checks after the dbus ones, and only
run the checks if it is present. Also mention dbus in the
error message if "--enable-systemd-login" was forced.

Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoshell: Don't send extra configure events on click
Derek Foreman [Thu, 10 Dec 2015 19:08:01 +0000 (13:08 -0600)]
shell: Don't send extra configure events on click

The click_to_activate handler fires on every mouse click for a surface
so let's be a little quicker to early return if you're clicking on the
surface that already has activation.

This prevents (among other side effects) the sending of two xdg_configure
events for every mouse click.

This should also make having two seats with keyboards behave in the same
way as a single seat.  Previously the second seat could have a keyboard
focus on the surface and prevent some of the extra processing (including
the extra configure events) from taking place.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoconfigure.ac: bump to version 1.10.90 for open development
Bryce Harrington [Wed, 17 Feb 2016 01:14:08 +0000 (17:14 -0800)]
configure.ac: bump to version 1.10.90 for open development

Master is open for new feature development again.

8 years agoconfigure.ac: bump to version 1.10.0 for the official release
Bryce Harrington [Tue, 16 Feb 2016 20:37:43 +0000 (12:37 -0800)]
configure.ac: bump to version 1.10.0 for the official release

8 years agoreleasing.txt: Script now figures out release name on its own
Bryce Harrington [Thu, 11 Feb 2016 23:23:33 +0000 (15:23 -0800)]
releasing.txt: Script now figures out release name on its own

8 years agoconfigure.ac: bump to version 1.9.93 for the RC1 release
Bryce Harrington [Tue, 9 Feb 2016 21:36:00 +0000 (13:36 -0800)]
configure.ac: bump to version 1.9.93 for the RC1 release

8 years agocompositor-drm: the cursor plane only supports ARGB
Derek Foreman [Thu, 3 Dec 2015 20:07:12 +0000 (14:07 -0600)]
compositor-drm: the cursor plane only supports ARGB

Keep XRGB apps out of the cursor plane, only ARGB is supported.

This prevents programs like weston-simple-shm from landing in the cursor
plane and being misrendered.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agocompositor-drm: update internal cursor plane location when disabling cursor
Derek Foreman [Fri, 5 Feb 2016 21:55:20 +0000 (15:55 -0600)]
compositor-drm: update internal cursor plane location when disabling cursor

When the cursor plane is disabled the kernel can lose its location.
If we don't update our internal idea of where the plane is at that time,
the next time we set a cursor it can show up at 0,0.

This can show up when an application is put in the cursor plane, removed
from the plane, then put back at the same location.  It might show up at
0,0 when it's reinstated.

We now use INT32_MIN as a location for disabled cursors so enabling the
plane will always cause an update.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
8 years agocompositor-x11: send pointer frame after axis event
Marek Chalupa [Wed, 3 Feb 2016 13:03:00 +0000 (14:03 +0100)]
compositor-x11: send pointer frame after axis event

clients that implement pointer interface of version 5
wait for the frame event, so without it the scrolling
does not work (GTK+ clients do not scroll now for example).
Xcb axis events are discrete, so it's fine to send
frame after every single axis event

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
8 years agoxwm: Don't clear the selection if it has no text type available
Derek Foreman [Mon, 1 Feb 2016 20:36:57 +0000 (14:36 -0600)]
xwm: Don't clear the selection if it has no text type available

weston maintains a copy of the most recently selected "thing" - it picks
the first available type when it copies, and saves that one only.

When an application quits weston will make the saved selection active.

When xwm sees the selection set it will check if any of the offered types
are text.  If no text type is offered it will clear the selection.

weston then interprets this in the same way as an application exiting and
causing the selection to be unset, and we get caught in a live lock with
both weston and xwayland consuming as much cpu as they can.

The simple fix is to just remove the test for text presence.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
8 years agoshell: Check more thoroughly for undefined surface resource
Bryce Harrington [Thu, 24 Sep 2015 00:30:43 +0000 (17:30 -0700)]
shell: Check more thoroughly for undefined surface resource

The surface can have an undefined resource in certain situations (such
as with xwayland).  So, since NULL is a valid state for this parameter,
and since the wl_resource_*, etc. calls require their parameters to be
non-NULL, make a practice of always checking the surface resource before
making wayland calls.

update v2:
  * Fix some c/p errors for pointer names
  * Drop null ptr check in add_popup_grab; probably redundant now

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
8 years agoivi-layout: apply opacity to weston_view correctly
Nobuhiko Tanibata [Sat, 26 Dec 2015 14:52:51 +0000 (23:52 +0900)]
ivi-layout: apply opacity to weston_view correctly

update_opacity is only called when a ivi-surface is visible. But the
previous code also checks event masks redundantly. However if the event
happens when ivi-surface is invisible, opacity is not calculated. This
patch removes this redundant check to fix potential bug.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoconfigure.ac: bump to version 1.9.92 for the beta release
Bryce Harrington [Tue, 2 Feb 2016 23:34:56 +0000 (15:34 -0800)]
configure.ac: bump to version 1.9.92 for the beta release

8 years agoinput: Fix crash when touchscreen generates out of screen coordinate
Bryce Harrington [Tue, 2 Feb 2016 18:18:48 +0000 (10:18 -0800)]
input: Fix crash when touchscreen generates out of screen coordinate

With change 61ed7b6b, global touch coordinates are being passed to the
touch grab.  However, touch->grab is undefined in certain circumstances
such as when the touch screen raises an axis X value larger than the
maximum expected.  Move the check for this condition earlier, before our
first use of the pointer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92736

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
8 years agodata-device: Check harder for selection/non-wayland sources
Carlos Garnacho [Mon, 1 Feb 2016 19:28:16 +0000 (20:28 +0100)]
data-device: Check harder for selection/non-wayland sources

We're not always dealing with weston_data_sources that have a
wl_resource, or data_sources that belong to drag-and-drop. Check
harder for these on the drag-and-drop code paths triggered from
common code.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
8 years agoxwayland: zalloc the x11_data_sources
Carlos Garnacho [Mon, 1 Feb 2016 19:28:15 +0000 (20:28 +0100)]
xwayland: zalloc the x11_data_sources

The wrapped weston_data_source struct has new fields which were left
uninitialized, so its access is unreliable.

The data source in xwayland/dnd.c should be eventually setting the
drag-and-drop actions, but it is a lot more incomplete than that
(read: completely), so falls out of the scope of this patch.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
8 years agoclipboard: zalloc the clipboard_source
Carlos Garnacho [Mon, 1 Feb 2016 19:28:14 +0000 (20:28 +0100)]
clipboard: zalloc the clipboard_source

The wrapped weston_data_source struct has new fields which were left
uninitialized, so its access is unreliable.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com
Tested-by: Derek Foreman <derekf@osg.samsung.com>
8 years agoinput: Don't try to send pointer frames if no focus_client
Derek Foreman [Fri, 29 Jan 2016 16:29:46 +0000 (10:29 -0600)]
input: Don't try to send pointer frames if no focus_client

Prevents a segfault when mousing into clients that don't get_pointer
like weston-simple-shm and weston-simple-damage.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
8 years agoreleasing: register_release now inserts the email announcement urls
Bryce Harrington [Wed, 20 Jan 2016 19:50:12 +0000 (11:50 -0800)]
releasing: register_release now inserts the email announcement urls

8 years agoconfigure.ac: bump to version for the release
Bryce Harrington [Tue, 19 Jan 2016 23:23:41 +0000 (15:23 -0800)]
configure.ac: bump to version  for the  release

8 years agodnd: Turn into a full blown example
Carlos Garnacho [Fri, 15 Jan 2016 20:14:27 +0000 (21:14 +0100)]
dnd: Turn into a full blown example

In order to keep things simple, weston-dnd made a few choices that
turn out to be unrealistic, a few tweaks have been done to make it
less of a playground demo:

- It now caters for copy/move operations, instead of just move,
  which still remains the default nonetheless.
- As "move" operations are no longer assumed, the item isn't removed
  on start_drag, instead it is made translucent until the drag
  operation finishes (and we know whether the item is to be
  removed after transfer or left as is)
- For the same reasons, "Drop nowhere to delete item" no longer
  happens. Drag-and-drop is a failable operation and must not result
  in data loss.
- As multiple actions are now allowed, we set the pointer icon
  surface accordingly to the current operation.

This makes weston-dnd a better example of what applications usually
want to do here.

Changes since v2:
  - Updated to behave alright-ish with version < 3.

Changes since v1:
  - Remove unneeded include. Remove extra newlines. Other minor
    code fixes.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agodata-device: Implement compositor-chosen actions
Carlos Garnacho [Fri, 15 Jan 2016 20:14:26 +0000 (21:14 +0100)]
data-device: Implement compositor-chosen actions

Set up a keyboard grab during drag-and-drop, so we can translate
modifiers into preferred actions. The compositor chosen action
is stored in the current weston_data_source in order to make it
accessible to the source/offer at the time of calculating the new
action, but would conceptually be part of weston_drag.

The mapping has been made similar to what GTK+/QT usually do, the
shift key defaults to "move" and ctrl defaults to "copy".

Changes since v2:
  - Use enum types and values for the compositor action. Fix
    code formatting issues.

Changes since v1:
  - Handle the keyboard grab being cancelled. Initialize new
    wl_data_source fields.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoclient: Add DnD cursors to the managed cursors list
Carlos Garnacho [Fri, 15 Jan 2016 20:14:25 +0000 (21:14 +0100)]
client: Add DnD cursors to the managed cursors list

That way we'll be able to set the corresponding pointer surface to
a current DnD operation.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agodata-device: Implement DnD actions
Carlos Garnacho [Mon, 18 Jan 2016 22:52:12 +0000 (23:52 +0100)]
data-device: Implement DnD actions

The policy in weston in order to determine the chosen DnD action is
deliberately simple, and is probably the minimals that any compositor
should be doing here.

Besides honoring the set_actions requests on both wl_data_source and
wl_data_offer, weston now will emit the newly added "action" events
notifying both source and dest of the chosen action.

The "dnd" client has been updated too (although minimally), so it
notifies the compositor of a "move" action on both sides.

Changes since v8:
  - Add back wl_data_offer.source_actions emission, gone during last
    code shuffling. Fix nits found in review.

Changes since v7:
  - Fixes spotted during review. Add client-side version checks.
    Implement .action emission as specified in protocol patch v11.

Changes since v6:
  - Emit errors as defined in DnD actions patch v10.

Changes since v5:
  - Use enum types and values for not-a-bitfield stored values.
    handle errors when finding unexpected dnd_actions values.

Changes since v4:
  - Added compositor-side version checks. Spaces vs tabs fixes.
    Fixed resource versioning. Initialized new weston_data_source/offer
    fields.

Changes since v3:
  - Put data_source.action to use in the dnd client, now updates
    the dnd surface like data_source.target events do.

Changes since v2:
  - Split from DnD progress notification changes.

Changes since v1:
  - Updated to v2 of DnD actions protocol changes, implement
    wl_data_offer.source_actions.
  - Fixed coding style issues.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Michael Catanzaro <mcatanzaro@igalia.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agodata-device: Implement DnD progress notification
Carlos Garnacho [Fri, 15 Jan 2016 20:14:23 +0000 (21:14 +0100)]
data-device: Implement DnD progress notification

Weston now sends wl_data_source.dnd_drop_performed and .dnd_finished in
order to notify about the different phases of DnD.

wl_data_source.cancelled is also used as mentioned in the docs, being
emitted also on DnD when the operation is meant to fail (eg. source
and dest didn't agree on a mimetype).

The dnd demo is also fixed so the struct dnd_drag isn't leaked.

https://bugs.freedesktop.org/show_bug.cgi?id=91943
https://bugs.freedesktop.org/show_bug.cgi?id=91944

Changes since v6:
  - Add client-side version checks. Minor code shuffling.

Changes since v5:
  - Dissociate source and offer after cancel. Updated to
    apply on top of c9f8f8a7f.

Changes since v4:
  - Make wl_data_offer.finish with the wrong state an error.

Changes since v3:
  - Fixed wl_data_source.dnd_finished vs cancelled emission on
    when interoperating with version < 3 drag destinations.

Changes since v2:
  - Handle wl_data_offer.finish. Fixed commit log inconsistencies.
    Added version checks. Spaces vs tabs fixes. Fixed resource
    versioning.

Changes since v1:
  - Updated to protocol v2.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Michael Catanzaro <mcatanzaro@igalia.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoSupport axis source, axis discrete, frame and axis stop events
Peter Hutterer [Mon, 18 Jan 2016 06:38:22 +0000 (16:38 +1000)]
Support axis source, axis discrete, frame and axis stop events

[jonas: only send focus wl_pointer.frame if resource supports it]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
8 years agoAdd a weston_pointer_axis_event
Peter Hutterer [Mon, 18 Jan 2016 05:58:17 +0000 (15:58 +1000)]
Add a weston_pointer_axis_event

Use an event struct to pass axis events around. This helps dealing with the
upcoming axis discrete changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agocompositor-rdp: update link to wheel delta explanation
Peter Hutterer [Mon, 18 Jan 2016 03:54:19 +0000 (13:54 +1000)]
compositor-rdp: update link to wheel delta explanation

The previous one is a 404 now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agoclients: Fix compositor version check for WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION
Christopher Michael [Sun, 20 Dec 2015 12:41:52 +0000 (07:41 -0500)]
clients: Fix compositor version check for WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Reviewed-By: David Fort <contact@hardening-consulting.com>
8 years agoclients: fix build on Linux
Olivier Fourdan [Thu, 14 Jan 2016 13:46:14 +0000 (14:46 +0100)]
clients: fix build on Linux

Cannot find out why stropts.h is needed and Linux doesn't support
streams anyway, so there is no stropts.h.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
8 years agogl-renderer: Fix comment typo
Bryce Harrington [Thu, 14 Jan 2016 02:48:56 +0000 (18:48 -0800)]
gl-renderer: Fix comment typo

8 years agocompositor: create_data_source(): Fix potential crash on OOM
cpaul@redhat.com [Tue, 5 Jan 2016 16:18:30 +0000 (11:18 -0500)]
compositor: create_data_source(): Fix potential crash on OOM

Noticed this while working on primary selection, in the event we run out
of memory when trying to create a new data source, there's a chance
we'll fail on wl_resource_create() and crash from source->resource being
set to NULL.

Signed-off-by: Lyude <cpaul@redhat.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agocompositor: Make types consistent for bitshifting unsigned ints
Bryce Harrington [Thu, 24 Dec 2015 02:38:07 +0000 (18:38 -0800)]
compositor: Make types consistent for bitshifting unsigned ints

8 years agocompositor: Verify that the maximum number of outputs is not exceeded
Bryce Harrington [Thu, 24 Dec 2015 04:53:53 +0000 (20:53 -0800)]
compositor: Verify that the maximum number of outputs is not exceeded

output_id_pool is defined as a uint32_t, thus ffs() provides a range of
1-32 available id numbers.  When the 33rd output is enabled, Weston will
set the ID to (unsigned)(-1) and thus lead to some unexpected
behaviors.

I'm not sure what the best way to handle this error would be since this
is in an initialization routine, but at least let's document the
potential error condition with an assert().

8 years agocompositor: Document how views and surfaces are mapped to outputs
Bryce Harrington [Wed, 23 Dec 2015 19:01:58 +0000 (11:01 -0800)]
compositor: Document how views and surfaces are mapped to outputs

8 years agodesktop-shell: Allow binding-modifier weston.ini option to be none
Bob Ham [Tue, 12 Jan 2016 10:21:49 +0000 (10:21 +0000)]
desktop-shell: Allow binding-modifier weston.ini option to be none

Allow the binding-modifier option in weston.ini to take a value of
"none", meaning that none of the usual Super+Tab, Super+K, Super+Fn,
etc. key bindings will be enabled.

Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
8 years agodesktop-shell: Make zapping configurable
Bob Ham [Tue, 12 Jan 2016 10:21:48 +0000 (10:21 +0000)]
desktop-shell: Make zapping configurable

Add a new boolean weston.ini option, "allow-zap" to enable or disable
the Ctrl-Alt-Backspace key combination.

Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
8 years agocompositor-{drm, fbdev, rpi}: Make VT switching configurable
Bob Ham [Tue, 12 Jan 2016 10:21:47 +0000 (10:21 +0000)]
compositor-{drm, fbdev, rpi}: Make VT switching configurable

Add a new boolean weston.ini option, "vt-switching" to enable or
disable Ctrl-Alt-Fn key combinations.

Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
(Derek Foreman changed the prototype for switch_vt_binding to
have a weston_keyboard * instead of weston_seat *.  The pointer
wasn't used, so this is just a warning fix.)

8 years agoclients: add simple-v4l-dmabuf client
Emmanuel Gil Peyrot [Mon, 11 Jan 2016 19:04:38 +0000 (19:04 +0000)]
clients: add simple-v4l-dmabuf client

This client opens a V4L2 device, usually exposed as /dev/videoN, and
retrieves its frames as dmabuf for later import into the compositor.

It supports both single- and multi-planar devices, and any format
exposed by the V4L2 device the Wayland compositor accepts.

This client never changes the v4l2 settings, use `v4l2-ctl -c` if you
want to change those.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Derek Foreman <derekf@osg.samsung.com>
Maniphest Tasks: T90

Differential Revision: https://phabricator.freedesktop.org/D339

8 years agoclients: Fix a few issues in simple-dmabuf-intel
Emmanuel Gil Peyrot [Mon, 11 Jan 2016 19:04:37 +0000 (19:04 +0000)]
clients: Fix a few issues in simple-dmabuf-intel

Those were found while working on simple-dmabuf-v4l, as found in the
next patch of this series.

After each buffer’s params were ready to be submitted to the
compositor, a roundtrip was done, which is wasteful since we can do it
only once after having queued all the params we want.  Removing those
nested roundtrips also prevent the potentially dangerous side-effect of
calling callbacks for later events while previous events were still
being processed.

An extraneous surface damage was also removed.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phabricator.freedesktop.org/D344

8 years agoclients: rename simple-dmabuf into simple-dmabuf-intel
Emmanuel Gil Peyrot [Mon, 11 Jan 2016 19:04:36 +0000 (19:04 +0000)]
clients: rename simple-dmabuf into simple-dmabuf-intel

This client was using an Intel-specific way to allocate a dmabuf, so it
makes sense to have that in its name.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phabricator.freedesktop.org/D342

8 years agogl-renderer: Add support for a few YUV dmabuf formats
Emmanuel Gil Peyrot [Mon, 11 Jan 2016 19:04:35 +0000 (19:04 +0000)]
gl-renderer: Add support for a few YUV dmabuf formats

Namely the single-planar YUYV, the two-planar NV12, and the
three-planar YUV420, using the shaders already present in Weston.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Maniphest Tasks: T13

Differential Revision: https://phabricator.freedesktop.org/D334

8 years agogl-renderer: introduce a new struct dmabuf_image
Emmanuel Gil Peyrot [Mon, 11 Jan 2016 19:04:34 +0000 (19:04 +0000)]
gl-renderer: introduce a new struct dmabuf_image

This struct serves as renderer data for linux-dmabuf buffers, and can
contain multiple struct egl_image, simplifying this latter in the
common non-dmabuf case.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phabricator.freedesktop.org/D333

8 years agocompositor: Document routines relating to idle behavior
Bryce Harrington [Fri, 11 Dec 2015 21:11:38 +0000 (13:11 -0800)]
compositor: Document routines relating to idle behavior

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agocompositor: Fix a couple comment typos
Bryce Harrington [Fri, 11 Dec 2015 21:11:37 +0000 (13:11 -0800)]
compositor: Fix a couple comment typos

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoxwm: let the shells decide the position of X windows
Giulio Camuffo [Fri, 11 Dec 2015 18:57:05 +0000 (20:57 +0200)]
xwm: let the shells decide the position of X windows

The xwm used to automatically send to Xwayland the position of X windows
when that changed, using the x,y of the primary view of the surface.
This works fine for the desktop shell but less so for others.
This patch adds a 'send_position' vfunc to the weston_shell_client that
the shell will call when it wants to let Xwayland know what the position
of a window is.
The logic used by the desktop-shell for that is exactly the same the xwm
used to have.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David Fort <contact@hardening-consulting.com>
8 years agocompositor-fbdev: Drop intermediate shadow buffer
Sjoerd Simons [Sat, 5 Dec 2015 01:20:12 +0000 (19:20 -0600)]
compositor-fbdev: Drop intermediate shadow buffer

Currently the fbdev compositor has its own shadow buffer when rendering
with pixman, causing the following copies to occur:

[pixman shadow buffer] -> [fbdev shadow buffer] -> [fbdev hardware]

As the pixman render already does all output translation when
compositing the intermediate shadow buffer really isn't needed, so drop
it.

As a side-effect this fixes updating the fbdev hardware for outputs not
starting at 0x0.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: David FORT <contact@hardening-consulting.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Derek Foreman <derekf@osg.samsung.com>
8 years agoweston-info: display output scale
Jonny Lamb [Thu, 17 Dec 2015 12:31:56 +0000 (12:31 +0000)]
weston-info: display output scale

Fall back to not showing anything as before if we don't have a
compositor with wl_output new enough (version 2 or newer).

Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: hmi-controller supports multi screens at random-mode.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:45:52 +0000 (15:45 +0900)]
ivi-shell: hmi-controller supports multi screens at random-mode.

It shows ivi applications at screensa randomly.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: hmi-controller supports multi screens at fullscreen mode.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:45:20 +0000 (15:45 +0900)]
ivi-shell: hmi-controller supports multi screens at fullscreen mode.

It shows ivi applications in fullscreen per screen like,
The first screen: Application 1,4,5,6,,,,
The seconed screen: Application 2,
The third screen: Application 3

Thie mode assigns one application to each screen at first. And remaind
applications more than screens will be assigned to the first screen.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: hmi-controller supports multi screens at side-by-side mode.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:44:07 +0000 (15:44 +0900)]
ivi-shell: hmi-controller supports multi screens at side-by-side mode.

It shows 2 ivi application in a screen at side-by-side. It moves
additinal application more than 2xN to next screen N+1.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: hmi-controller supports multi screens at tiling mode.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:43:30 +0000 (15:43 +0900)]
ivi-shell: hmi-controller supports multi screens at tiling mode.

It shows 8 ivi applications in a screen at tiling. It moves additional
application more than 8xN to next screen N+1.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agohmi-controller: allocate application layers for multi-screen
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:42:46 +0000 (15:42 +0900)]
hmi-controller: allocate application layers for multi-screen

To locate surfaces of application on multi screens, multi layers are
created baseod on application-layer-id + base-layer-id-offset x N.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agohmi-controller: allocate background surfaces for multi-screen
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:41:46 +0000 (15:41 +0900)]
hmi-controller: allocate background surfaces for multi-screen

A surface ID for layer of background/panel image is set by key: background-id
or panel-id at weston.ini. To support multi screens, it also support offset,
surface-id-offset, to offset the surface ID to next ID for a layer on next
screen.

According to the above key, hmi-controller and ivi-shell-user-interface
who increments the number of screens per notification of wl_output.
crate surface and draw background/panel image on multi surface on screens.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agohmi-controller: allocate base layers for multi-screen
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:41:00 +0000 (15:41 +0900)]
hmi-controller: allocate base layers for multi-screen

A layer ID for screen is set by key: base-layer-id at weston.ini. To
support multi screens. It also support offset to offset the layer ID
to next ID for next screen.

For example,
base-layer-id=1000
base-layer-id-offset=10000

Layer id for screen 0: 1000
Layer id for screen 1: 11000
Layer id for screen 2: 21000

To support multi screen, create layers for background and panel bar which
located in the below per screens. At the moment, it is only layers.
Surfaces to be created at next patch in the patch set.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: hmi-controller implements internal method to get screen.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:40:13 +0000 (15:40 +0900)]
ivi-shell: hmi-controller implements internal method to get screen.

- get screens from weston core
- provide screens as internel method
- the iviscn is stored in array inverse order in index.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: multi screen support to calcuration of a mask of weston_surface.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:39:26 +0000 (15:39 +0900)]
ivi-shell: multi screen support to calcuration of a mask of weston_surface.

A weston_surface is transformed to multi screen coordinate, global
coordinate by matrix:m now.

Additionally, a mask needs to be calucated, taking account into,
- multi screen coordination: a destination rectangle of layer in the
  coordination is easily calcurated by adding weston_output.{x,y} in
  simple. This is because there is no scaled and rotated transformation.
- intersect inside of a screen the layer is assigned to. This is because
  overlapped region of weston surface in another screen shall not be
  displayed according to ivi use case.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: convert from screen to global coordinates
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:38:41 +0000 (15:38 +0900)]
ivi-shell: convert from screen to global coordinates

In single screen, the coordinates of layer local coordinates are the
same as global coordinates. However, to support multi screens, the
layer-local coordinates shall be transformed to multi screen coordinates,
which is global coordinates. The abosolute coordinates of a screen in global
stored in (x,y) of output of its weston output so it shall be used to
transform layer-local to global coordinates.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: avoid update_prop() on invisible surfaces
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:36:58 +0000 (15:36 +0900)]
ivi-shell: avoid update_prop() on invisible surfaces

For multi screen support, ivi_layout_screen to be taken account into
property change in commitChanges.

Property change is now done in update_prop so to consider ivi_screen
property for caluculating transform of weston surface, ivi_layout_screen
 is added as a parameter of update_prop.

However, update_prop of weston_view of a ivi_surface can not be done
even if it is set on a screen. The propoerty change shall be done only
when a visibility of ivi_surface or ivi_layer which contains the
ivi_surface is ON. Such a condition shall be checked at commit_changes
as well to avoid calling update_prop, which actually updates
weston_views.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoivi-shell: activate weston surface with a seat when left click or touch.
Nobuhiko Tanibata [Wed, 9 Dec 2015 06:03:47 +0000 (15:03 +0900)]
ivi-shell: activate weston surface with a seat when left click or touch.

Similar with Desktop shell, set activate to weston surface which is
left-clicked by pointer or touched. This is needed to focus it with a seat.
Without this, a feature who gets activated weston surface by using
weston_surface_get_main_surface doesn't work correctly because it can
not get correct focused weston surface. For example, input-panel uses
weston_surface_get_main_surface to get a weston surface. With this
weston surface, it get a member: output to decide which output shall
show a input-panel, software keyboard. Without activation,
input-panel-ivi can not find a correct output which shows e.g.
weston-editor who uses input-method.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agocompositor-wayland: Add touch support
Derek Foreman [Fri, 6 Nov 2015 21:56:10 +0000 (15:56 -0600)]
compositor-wayland: Add touch support

Adds support for touch devices to the wayland backend.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
8 years agoinput: Add notify_touch_cancel()
Derek Foreman [Fri, 6 Nov 2015 21:56:09 +0000 (15:56 -0600)]
input: Add notify_touch_cancel()

We already have notify_touch(), notify_touch_frame().  We need
notify_touch_cancel() to implement touch in the weston wayland backend
properly.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
8 years agocompositor-wayland: Properly release input resources when caps change
Derek Foreman [Fri, 6 Nov 2015 21:56:08 +0000 (15:56 -0600)]
compositor-wayland: Properly release input resources when caps change

We should use wl_*_release when available instead of destroy, and we
should update weston's internal input tracking with weston_seat_releases

Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
8 years agocairo-util: return theme location from frame_touch_down
Derek Foreman [Fri, 6 Nov 2015 21:56:07 +0000 (15:56 -0600)]
cairo-util: return theme location from frame_touch_down

I'll be using this in a follow up patch that adds touch input to weston's
wayland backend.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
8 years agoconfigure.ac: add explicit enable/disable for lcms
Jussi Kukkonen [Fri, 27 Nov 2015 14:37:35 +0000 (16:37 +0200)]
configure.ac: add explicit enable/disable for lcms

This is useful for reproducable builds.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agocosmetic: Remove use of C++ style comments
Chris Michael [Thu, 3 Dec 2015 17:23:12 +0000 (12:23 -0500)]
cosmetic: Remove use of C++ style comments

Patch updated to remove dead lines as suggested by Daniel Stone

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
8 years agocompositor: Add doxygen for weston_surface_to_buffer_rect()
Derek Foreman [Thu, 3 Dec 2015 22:38:11 +0000 (16:38 -0600)]
compositor: Add doxygen for weston_surface_to_buffer_rect()

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agosimple-damage: Add --use-damage-buffer flag
Derek Foreman [Wed, 18 Nov 2015 22:32:34 +0000 (16:32 -0600)]
simple-damage: Add --use-damage-buffer flag

Add a new flag for testing damage in buffer co-ordinates

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agocompositor: Add damage_buffer
Derek Foreman [Thu, 26 Nov 2015 20:17:48 +0000 (14:17 -0600)]
compositor: Add damage_buffer

Add an implementation of wl_surface.damage_buffer, similar to
wl_surface.damage except it uses buffer co-ordinates.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
8 years agolinux-dmabuf: Move the attributes part of linux_dmabuf_buffer into its own struct
Emmanuel Gil Peyrot [Tue, 24 Nov 2015 19:28:24 +0000 (19:28 +0000)]
linux-dmabuf: Move the attributes part of linux_dmabuf_buffer into its own struct

This allows renderers to use that struct to create their own dmabufs,
in case they can’t import the one provided by the client directly but
know how to convert it into a format they can render.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D332
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>